Dag based methods and systems of transaction processing in a distributed ledger

ABSTRACT

Described herein are systems and methods for a DAG based transaction processing system and method in a distributed ledger. In accordance with an embodiment, a DAG based transaction processing system and method in a distributed ledger can be introduced. The model can help achieve improved throughput performance. With additional weight mechanism, the final performance can be adjusted based on various business requirements. This is different from existing work that uses linear structure and can achieve better performance.

CLAIM OF PRIORITY

This application claims the benefit of priority to U.S. ProvisionalPatent Application entitled “DAG BASED METHODS AND SYSTEMS OFTRANSACTION PROCESSING IN A DISTRIBUTED LEDGER”, Application No.62/722,595, filed on Aug. 24, 2018; which application is incorporated byreference in its entirety.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

FIELD OF INVENTION

This disclosure relates generally to systems and methods for providingdistributed ledgers. More particularly the disclosure describes systemand methods and components thereof for Directed Acyclic Graph (DAG)based methods and systems of transaction processing in a distributedledger.

BACKGROUND

A distributed ledger may be broadly described as a digital record ofasset ownership. There is no central administrator of the ledger, nor isthere a central data store. Instead, the ledger is replicated acrossmany participating nodes in a computing environment that may begeographically spread across multiple sites, countries, or institutions.A consensus protocol ensures that each node's copy of the ledger isidentical to every other node's copy. As well, the set of copies may beviewed as a single shared ledger. A distributed ledger may be used byasset owners using cryptographic signature technology, for example, todebit their account and credit another's account.

A blockchain is a data structure can be used to implementtamper-resistant distributed ledgers. Multiple nodes follow a commonprotocol in which transactions from clients are packaged into blocks,and nodes use a consensus protocol to agree on the next block. Blockscarry cumulative cryptographic hashes making it difficult to tamper withthe ledger. Each block can have a reference [hash value] to the previousblock in time. In addition, each block can comprise its own hash. Theblockchain can be traversed traverse backwards (e.g., up the chain).

Permissionless decentralized ledgers allow anonymous participants tomaintain the ledger, while avoiding control by any single entity.However, identity, accountability and auditability are difficult inlight of the anonymity. In contrast, permissioned decentralized ledgersallow for levels of trust and accountability by allowing explicitlyauthorized parties to maintain the ledger. Permissioned ledgers supportmore flexible governance and a wider choice of consensus mechanisms.Both kinds of decentralized ledgers may be susceptible to manipulationby participants who favor some transactions over others. However, theaccountability underlying permissioned ledgers provides an opportunityto constraints that can be enforced on participants.

Blockchain helps bring potential solutions to the distributed ledgerproblem, with a linear record structure to record transaction history.However, due to the fundamental properties of distributed system,transaction conflicts often happens with multiple parties send numbersof transactions to the same shared ledger. There are several ways toalleviate the conflicts, however, neither way provides a goodperformance.

Typical public Blockchains, like those that are associated withcryptocurrencies, allow miners to decide which transactions to keep, andwhich to reject, based upon ordering. An incentive model is actuallychosen here as those miner will always prefer those transactions withmore fees. It is always blamed that public Blockchains perform veryslowly, partially due to the incentive model.

Typical enterprise blockchain-like fabric picks up a timing model whereeach peer just submits the transactions based on the timing order in thebatch from ordering service. In this case, there will be case that lotsof transactions be rejected due to the timing order.

SUMMARY

Described herein is system and methods and components thereof for DAGbased methods and systems of transaction processing in a distributedledger, in accordance with an embodiment.

In accordance with an embodiment, the disclosure herein provides a newtransaction processing model by introducing the DAG structure. The newmodel can help achieve high throughput performance. With additionalweight mechanism, the final performance can be adjusted based on variousbusiness requirements. This is quite different from existing work thatuse linear structure and can achieve better performance in some cases.

The Hyperledger Project is a collaborative effort established as aproject of the Linux Foundation to create an enterprise-grade,open-source distributed ledger framework and code base. HyperledgerFabric is an implementation of a distributed ledger platform for runningsmart contracts. It leverages container technology to host smartcontracts called “chaincode” that comprise the application logic of thesystem.

In accordance with an embodiment, participants in a Hyperledger havereplicated copies of the ledger. In addition to ledger information beingshared, the processes which update the ledger are also shared. Unlikeother systems where a participant's private programs are used to updateassociated private ledgers, a blockchain system has shared programs toupdate shared ledgers. With the ability to coordinate their businessnetwork through a shared ledger, blockchain networks can reduce thetime, cost, and risk associated with the distribution into a ledger ofprivate information, as well as the processing time (while increasingtrust). Hyperledger Fabric is private and permissioned. Members of aHyperledger Fabric network are enrolled. Hyperledger Fabric also offersthe ability to create channels. Each channel can contain a separateledger of transactions visible to a particular group of participants.This allows for transaction privacy.

In accordance with an embodiment, a distributed ledger protocol of thefabric is run by peers. The fabric distinguishes between two kinds ofpeers: A validating peer is a node on the network responsible forrunning consensus, validating transactions, and maintaining the ledger.On the other hand, a non-validating peer is a node that functions as aproxy to connect clients (issuing transactions) to validating peers. Anon-validating peer does not execute transactions but it may verifythem. Some features of the fabric include permissioned blockchain withimmediate finality which runs arbitrary smart contracts calledchaincode. The user-defined chaincode smart contracts are encapsulatedin a container and system chaincode runs in the same process as thepeer. The process of keeping the ledger transactions synchronized acrossthe network (e.g., to ensure that ledgers only update when transactionsare approved by the appropriate participants, and that when ledgers doupdate, they update with the same transactions in the same order)—can bereferred to as consensus. The fabric implements a consensus protocol andsecurity through support for certificate authorities (CAs) for TLS(transport layer security) certificates, enrollment certificates andtransaction certificates.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1A illustrates transaction flow in a fabric of a Blockchain cloudservice system in accordance with an embodiment.

FIG. 1B illustrates a Blockchain cloud service system in accordance withan embodiment.

FIG. 1C illustrates a BCS system in accordance with an embodiment.

FIG. 1D illustrates a BCS system in accordance with an embodiment.

FIG. 2 illustrates a gateway for a Blockchain cloud service system inaccordance with an embodiment.

FIG. 3 illustrates a persistence for a Blockchain cloud service systemin accordance with an embodiment.

FIG. 4 illustrates an example deployment of a fabric on BCS.

FIG. 5 illustrates a chaincode architecture, in accordance with anembodiment.

FIG. 6 illustrates a system for providing a management console inaccordance with an embodiment.

FIG. 7A illustrates examples of user interfaces in a BCS console UI inaccordance with an embodiment.

FIG. 7B illustrates examples of user interfaces in a BCS console UI inaccordance with an embodiment.

FIG. 8 illustrates a system for providing a REST proxy in a BCS instancein accordance with an embodiment.

FIG. 9A shows a typical IDCS use case for a single sign-on, inaccordance with an embodiment.

FIG. 9B shows an IDCS use case for Fabric Client Authentication, inaccordance with an embodiment.

FIG. 10 shows a system for DAG based methods and systems of transactionprocessing in a distributed ledger, in accordance with an embodiment.

FIG. 11 shows an example relationship graph which can be used inembodiments of the present disclosure, in accordance with an embodiment.

FIG. 12 shows an example relationship graph which can be used inembodiments of the present disclosure, in accordance with an embodiment.

FIG. 13 shows an example relationship graph which can be used inembodiments of the present disclosure, in accordance with an embodiment.

FIG. 14 is a flowchart of an example method for directed acyclic graph(DAG) based transaction processing in a distributed ledger, inaccordance with an embodiment.

DETAILED DESCRIPTION

In accordance with an embodiment, described herein are systems andmethods for supporting SQL-based rich queries in a blockchain fabric. Inaccordance with an embodiment, the systems and methods provided hereinprovide the ability to execute SQL queries to allow for the creation ofcomplex smart contracts much easier and more maintainable manner. Also,performance is improved both by pushing the data filtering back to thestorage engine (rather than happening at the smart contract level), andby being able to rely on relational engines which support concurrentread and write data access. As well, the state of the world database canalso provide for concurrent read/write access.

In accordance with an embodiment, an example blockchain fabric thatsupports SQL-based rich queries in a blockchain fabric can be providedas a cloud service. In accordance with an embodiment, theenterprise-grade framework includes scalability, management,configuration, persistence, and compatibility with a diverse range ofcustomer applications through use of cloud technologies. In a particularembodiment, a permissioned blockchain ledger and blockchain fabric areprovided as a Blockchain Cloud Service (BCS).

In the following description, the teachings of the present disclosurewill be illustrated, by way of example and not by way of limitation, inthe figures of the accompanying drawings. References to variousembodiments in this disclosure are not necessarily to the sameembodiment, and such references mean at least one. While specificimplementations are discussed, it is understood that this is providedfor illustrative purposes only. A person skilled in the relevant artwill recognize that other components and configurations may be usedwithout departing from the scope and spirit of the disclosure.

Furthermore, in certain instances, numerous specific details will be setforth to provide a thorough description of the disclosure. However, itwill be apparent to those skilled in the art that the disclosure may bepracticed without these specific details. In other instances, well-knownfeatures have not been described in as much detail so as not to obscurethe disclosure.

The present disclosure is described with the aid of functional buildingblocks illustrating the performance of specified functions andrelationships thereof. The boundaries of these functional buildingblocks have often been arbitrarily defined herein for the convenience ofthe description. Thus functions shown to be performed by the sameelements may in alternative embodiments be performed by differentelements. Functions shown to be performed in separate elements mayinstead be combined into one element. Alternate boundaries can bedefined so long as the specified functions and relationships thereof areappropriately performed. Any such alternate boundaries are thus withinthe scope and spirit of the disclosure.

Common reference numerals are used to indicate like elements throughoutthe drawings and detailed description; therefore, reference numeralsused in a figure may or may not be referenced in the detaileddescription specific to such figure if the element is describedelsewhere.

Blockchain technology has the potential to dramatically enhanceenterprise business value by enabling near real-time, distributedtransactions across customers' ecosystems and by enabling secure,tamper-proof data sharing. The Hyperledger Fabric blockchainincorporates modular architecture, horizontal/cross-industry technologysupport, and support for enterprise needs.

INTRODUCTION

In accordance with an embodiment, a Hyperledger Fabric is a platform fordistributed ledger solutions underpinned by a modular architecturedelivering high degrees of confidentiality, resiliency, flexibility andscalability. It is designed to support pluggable implementations ofdifferent components and accommodate the complexity and intricacies thatexist across the economic ecosystem.

In accordance with an embodiment, a Hyperledger Fabric delivers anelastic and extensible architecture, distinguishing it from alternativeblockchain solutions.

Blockchain—A Distributed Ledger

In accordance with an embodiment, a blockchain network can comprise adistributed ledger that records all the transactions that take place ona network.

A blockchain ledger is often described as decentralized because it isreplicated across many network participants, each of whom collaborate inits maintenance. Decentralization and collaboration are attributes thatmirror the way businesses exchange goods and services in the real world.

In addition to being decentralized and collaborative, the informationrecorded to a blockchain is append-only, using cryptographic techniquesthat guarantee that once a transaction has been added to the ledger itcannot be modified. This property of immutability makes it simple todetermine the provenance of information because participants can be sureinformation has not been changed after the fact. In this way,blockchains can be thought of as systems of proof.

Blockchain—Smart Contracts

In accordance with an embodiment, in order to support the consistentupdate of information—and to enable certain ledger functions(transacting, querying, etc.)—a blockchain network uses smart contractsto provide controlled access to the ledger.

In accordance with an embodiment, smart contracts are not only a keymechanism for encapsulating information and keeping it simple across thenetwork, they can also be written to allow participants to executecertain aspects of transactions automatically.

A smart contract can, for example, be written to stipulate the cost ofshipping an item that changes depending on when it arrives. With theterms agreed to by both parties and written to the ledger, theappropriate funds change hands automatically when the item is received.

Blockchain—Consensus

In accordance with an embodiment, the process of keeping the ledgertransactions synchronized across the network—to ensure that ledgers onlyupdate when transactions are approved by the appropriate participants,and that when ledgers do update, they update with the same transactionsin the same order—can be referred to as consensus.

In accordance with an embodiment, a blockchain can be thought of as ashared, replicated transaction system which is updated via smartcontracts and kept consistently synchronized through a collaborativeprocess called consensus.

Advantages of Blockchain

In accordance with an embodiment, the currently available transactionalnetworks are versions of networks that have existed since businessrecords have been kept. The members of a business network transact witheach other, but each member maintains separate records of theirtransactions. As well, objects of the transactions can have theirprovenance established each time they are sold to ensure that thebusiness selling an item possesses a chain of title verifying theirownership of it.

Despite current business networks being modernized by computing systems,unified systems for managing the identity of network participants do notexist, establishing provenance is laborious as it takes days to clearsecurities transactions (the world volume of which is numbered in themany trillions of dollars), contracts must be signed and executedmanually, and every database in the system contains unique informationand therefore represents a single point of failure.

Blockchain, in accordance with an embodiment, provides an alternative tomany of the inefficiencies represented by the standard system oftransactions, by providing a standard method for establishing identityon the network, executing transactions, and storing data.

In accordance with an embodiment, in a blockchain network, eachparticipant in it has its own replicated copy of the ledger. In additionto ledger information being shared, the processes which update theledger are also shared. Unlike other systems, where a participant'sprivate programs are used to update their private ledgers, a blockchainsystem has shared programs to update shared ledgers.

In accordance with an embodiment, with the ability to coordinatebusiness networks through a shared ledger, blockchain networks canreduce the time, cost, and risk associated with private information andprocessing while improving trust and visibility.

Hyperledger Fabric

Hyperledger Fabric, like other blockchain technologies, has a ledger,uses smart contracts, and is a system by which participants manage theirtransactions.

Where Hyperledger Fabric differs from some other blockchain systems isthat it is private and permissioned. Rather than the “proof of work”some blockchain networks use to verify identity (allowing anyone whomeets those criteria to join the network), the members of a HyperledgerFabric network enroll through a membership services provider.

Hyperledger Fabric also offers several pluggable options. Ledger datacan be stored in multiple formats, consensus mechanisms can be switchedin and out, and different MSPs (Membership Service Providers) aresupported.

Hyperledger Fabric also offers the ability to create channels, allowinga group of participants to create a separate ledger of transactions.This allows for an option for networks where some participants might becompetitors and not want every transaction they make—a special pricethey are offering to some participants and not others, for example—knownto every participant. If two participants form a channel, then thoseparticipants—and no others—have copies of the ledger for that channel.

Shared Ledger

In accordance with an embodiment, a Hyperledger Fabric has a ledgersubsystem comprising two components: the world state and the transactionlog. Each participant has a copy of the ledger to every HyperledgerFabric network they belong to.

The world state component describes the state of the ledger at a givenpoint in time. It is the database of the ledger. The transaction logcomponent records all transactions which have resulted in the currentvalue of the world state. It is the update history for the world state.The ledger, then, is a combination of the world state database and thetransaction log history.

The shared ledger has a replaceable data store for the world state. Bydefault, this is a LevelDB key-value store database. The transaction logdoes not need to be pluggable. It simply records the before and aftervalues of the ledger database being used by the blockchain network.

Smart Contracts

Hyperledger Fabric smart contracts are written in chaincode and areinvoked by an application external to the blockchain when thatapplication needs to interact with the ledger. In most cases chaincodeonly interacts with the database component of the ledger, the worldstate (querying it, for example), and not the transaction log.

Consensus

In accordance with an embodiment, transactions are written to the ledgerin the order in which they occur, even though they might be betweendifferent sets of participants within the network. For this to happen,the order of transactions is established and a method for rejecting badtransactions that have been inserted into the ledger in error (ormaliciously) can be put into place.

Hyperledger Fabric allows a network entity (e.g., a network user, peer,starter) to select a consensus mechanism that best represents therelationships that exist between participants. As with privacy, there isa spectrum of needs; from networks that are highly structured in theirrelationships to those that are more peer-to-peer.

Chaincode

In accordance with an embodiment, chaincode can comprise softwaredefining an asset or assets, and the transaction instructions formodifying the asset(s)—it is the business logic. Chaincode enforces therules for reading or altering key value pairs or other state databaseinformation. Chaincode functions execute against the ledger currentstate database and are initiated through a transaction proposal.Chaincode execution results in a set of key value writes (write set)that can be submitted to the network and applied to the ledger on allpeers.

Ledger Features

In accordance with an embodiment, a ledger is the sequenced,tamper-resistant record of all state transitions in the fabric. Statetransitions are a result of chaincode invocations (‘transactions’)submitted by participating parties. Each transaction results in a set ofasset key-value pairs that are committed to the ledger as creates,updates, or deletes.

The ledger is comprised of a blockchain to store the immutable,sequenced record in blocks, as well as a state database to maintaincurrent fabric state. There can be one ledger per channel, with eachchannel comprising a separate ledger of transactions visible to aparticular group of participants. Each peer maintains a copy of theledger for each channel of which they are a member.

Privacy Through Channels

In accordance with an embodiment, hyperledger fabric employs animmutable ledger on a per-channel basis, as well as chaincodes that canmanipulate and modify the current state of assets (i.e. update key valuepairs). A ledger exists in the scope of a channel—it can be sharedacross the entire network (assuming every participant is operating onone common channel)—or it can be privatized to only include a specificset of participants.

In the latter scenario, such participants can create a separate channeland thereby isolate/segregate their transactions and ledger. In order toallow for scenarios that want to bridge the gap between totaltransparency and privacy, chaincode can be installed only on peers thatneed to access the asset states to perform reads and writes (e.g., if achaincode is not installed on a peer, it will not be able to properlyinterface with the ledger). To further obfuscate the data, values withinchaincode can be encrypted (in part or in total) using commoncryptographic algorithms such as AES (Advanced Encryption Standard)before appending to the ledger.

In accordance with an embodiment, privacy can also be improved with thenotion of “private collections”—which are a finer grain concept thanprivacy by channels.

Security & Membership Services

In accordance with an embodiment, Hyperledger Fabric provides for atransactional network where all participants have known identities.Public Key Infrastructure is used to generate cryptographic certificateswhich are tied to organizations, network components, and end users orclient applications. As a result, data access control can be manipulatedand governed on the broader network and on channel levels. This“permissioned” notion of Hyperledger Fabric, coupled with the existenceand capabilities of channels, helps address scenarios where privacy andconfidentiality are paramount concerns.

Consensus

In accordance with an embodiment, in a distributed ledger, consensus canencompass more than simply agreeing upon the order of transactions. Thisdifferentiation is highlighted in Hyperledger Fabric through itsfundamental role in the entire transaction flow, from proposal andendorsement, to ordering, validation and commitment. Consensus can bedefined as the full-circle verification of the correctness of a set oftransactions comprising a block.

Consensus is ultimately achieved when the order and results of a block'stransactions have met the explicit policy criteria checks. These checksand balances take place during the lifecycle of a transaction, andinclude the usage of endorsement policies to dictate which specificmembers must endorse a certain transaction class, as well as systemchaincodes to ensure that these policies are enforced and upheld. Priorto commitment, the peers can employ these system chaincodes to make surethat enough endorsements are present, and that they were derived fromthe appropriate entities. Moreover, a versioning check can take placeduring which the current state of the ledger is agreed or consentedupon, before any blocks containing transactions are appended to theledger. This final check provides protection against double spendoperations and other threats that might compromise data integrity, andallows for functions to be executed against non-static variables.

In addition to the endorsement, validity and versioning checks that takeplace, there are also ongoing identity verifications happening in thetransaction flow. Access control lists are implemented on hierarchallayers of the network (ordering service down to channels), and payloadsare repeatedly signed, verified and authenticated as a transactionproposal passes through the different architectural components.Consensus is not limited to the agreed upon order of a batch oftransactions, but rather, it is a process that is achieved as abyproduct of the ongoing verifications that take place during atransaction's flow from proposal to commitment.

Blockchain Cloud Service—Architecture

In accordance with an embodiment, a system, such as a cloud system(e.g., Blockchain Cloud Service (BCS)), can utilized the above describedHyperledger Fabric as a starting point. Such a system offers a highlyadvanced and differentiated enterprise-grade distributed ledger cloudplatform that allows for the building of new blockchain-basedapplications and/or the extension of existing SaaS, PaaS, and IaaS andon-premises applications.

In accordance with an embodiment, the system can supportmission-critical enterprise needs such as scalability, security,robustness, integration, and performance to remove barriers to adoptionand support blockchain applications in production. The system allows forusers to deploy, configure, manage and monitor blockchain and reduce thecost for deploying blockchain in enterprises by providing BCS as aPlatform as a Service (PaaS) Cloud solution. The system also acceleratesthe development and integration of blockchain applications with otherplatforms. The system allows SaaS cloud customers to enable theirenterprise processes like Procurement, Payments, Trade Finance,Accounting, HR, CX to securely share data and conduct distributedtransactions with 3rd party applications and external distributed ledgertechnologies using blockchain cloud platform.

In accordance with an embodiment, the system is a cloud service based ona PaaS manager (e.g., Oracle PaaS Service Manager (PSM) platform). Ingeneral, such a system is a managed cloud service that runs in computespace (e.g., external compute space). In embodiments, the systemutilizes features of the PSM platform including Oracle ApplicationContainer Cloud Service (ACCS) Layered using Oracle Identity CloudService (IDCS), Oracle Load Balancer as a Service (LBaaS), Oracle EventHub Cloud Service, and Oracle Cloud Storage. Each customer blockchaincan be provisioned, and can be run as a tenant. The system supportsmultiple blockchains, each provisioned and running as a separate tenantin a multitenant environment.

Accordingly, the system allows for applications or customer applicationsto implement a distributed ledger with smart contracts as necessary ordesirable for the applications. Clients and users of such a system canbe internal or external to cloud—blockchain trust—some blockchainnetworks may comprise components outside the cloud environment (or couldbe constrained to a particular cloud).

In accordance with an embodiment, such a system can be useful for a widevariety of application functions in particular in multi-partytransactions where trust and identity issues must be resolved. Unlikeother blockchain systems, the provided system service is not anonymous.Indeed, identity and auditability are fundamental and integratedelements. Accordingly BCS finds applications in, for example, capitalmarkets, cross-border transactions, financial services, assettransactions, legal regulatory applications, healthcare records,publishing, logistics, traceability, and anti-counterfeiting.

As described above, each party on a blockchain has access to the entiredatabase and its complete history (unless the ledger has beenprovisioned/privatized to certain parties). No single party controls thedata or the information. Every party can also verify the records of itstransaction partners directly, without an intermediary. Communicationoccurs directly between peers instead of through a central node. Eachnode stores and forwards information to all other nodes. Once atransaction is entered in the database and the accounts are updated, therecords cannot be altered, because they are linked to every transactionrecord that came before them (hence the term “chain”). If a transactionis in error, a new transaction must be used to reverse the error, andboth transactions are then visible to provisioned users. To add a newvalid transaction, participants can agree on its validity via aconsensus mechanism. Participants in the blockchain can certify wherethe asset came from and how the ownership of the asset has changed overtime. A digital signature can be used to authenticate document and canbe placed in Access Control [varied level of permissions] AndProgrammability [Executable Business rules].

In many multi-party transactions, money is exchanged, when a partyreceives the assets or services. Typically because of transaction time,one or other party must commits goods or money before the other. In someenvironments, trust issues are resolved by using an intermediary whichholds funds in escrow until completion of conditions in the contract.This resolves trust issues between the original parties. However, such amethod adds another centralized party which must be trusted, increasingcomplexity, and likely the cost of the transaction. Use of smartcontracts as part of the provided system can eliminate the need forintermediary—parties can conduct trusted transactions on the blockchainwithout having an intermediary.

In accordance with an embodiment, advantages of the provided system,such as BCS, include that the information contained therein isdistributed. Access is controlled and some privacy can be maintainedalthough auditability is available. Moreover, the blockchain ledger isessentially immutable and cannot be repudiated. The ledger comprises ofa list of blocks. Each transaction block contains: Block ID, PreviousHash, Data Hash, Timestamp, Transaction ID List, Actions (1 . . . n),Chaincode ID, Chaincode proposal, Response (r/w set, events, success orfailure), Endorsers. As each block contains the previous hash and itsown hash, the blocks are inherently ordered and immutable onceknown/distributed (note: the hash of a present block is a hash of thehash of the previous block and the other data in the present block,hence linking the blocks in a chain). A consensus can resolvediscrepancies. Compared to a centralized database or intermediary, thereis no need to give undue authority to a centralized authority. Thedistributed nature of the ledger also augments the fundamentalimmutability of the blockchain recording technology in that the use ofdistributed copies—and consensus make it difficult to modify (even wherealgorithmically possible). Thus, given the ordering oftransactions—hacking ledger is nearly impossible if somebody has a copyof the latest block in the chain.

In particular embodiments, as described below, the provided system canbe based on the Oracle PaaS Service Manager (PSM) platform and isaugmented with a management console whichsimplifies/facilitates/automates provisioning, monitoring andconfiguration of fabric based blockchains. Additionally, a REST proxyservice including a unitary REST API is provided to simplify contactbetween applications and the Blockchain fabric. Developers can buildsmart contracts, use the management console to deploy the smartcontracts, and then let the applications invoke the smart contract onthe blockchain either asynchronously (which is the default) orsynchronous (if an immediate response is desired). The REST proxyservice and API provides both synchronous and asynchronous capabilitiesdepending on the needs of the platform.

In accordance with an embodiment, a Fabric-CA server can provide amembership service for a fabric. The Fabric-CA server can comprise threeparts: authentication for user, authorization for accessing a Blockchain(a group of peers and orders) and a CA server which could delivercertificate to application client, peer and order. Fabric-CA can utilizea certificate to implement authentication and authorization. Thecertificate include two types: enroll certificate for authentication andtransaction certificate for authorization. In accordance with anembodiment, an identity service, such as IDCS, can also provideauthentication and authorization.

Hyperledger Fabric

As described above, in an embodiment, the provided system can implementa Hyperledger Fabric providing a distributed ledger platform for runningsmart contracts. The fabric leverages container technology to host smartcontracts called “chaincode” that comprise the application logic of thesystem. In alternative embodiments the Block Chain Cloud Serviceimplements alternative distributed ledger platforms including forexample, the “Tendermint” ledger system as described in U.S. patentapplication Ser. No. 15/169,622, entitled “Accountability And Trust InDistributed Ledger Systems”, filed May 31, 2016, which is incorporatedby reference.

The distributed ledger protocol of the hyperledger fabric is run bypeers. One disadvantage of prior blockchain technologies is that allpeers are required to record all transactions. This creates substantialI/O and processor overhead and does not conveniently scale toenterprise-grade systems. The hyperledger fabric distinguishes betweentwo kinds of peers: A committer peer is a node on the network that canverify endorsements and validate transaction results prior to committingtransactions to the blockchain, and maintain the ledger. On the otherhand, a non-validating peer is a node that functions as a proxy toconnect clients (issuing transactions) to validating peers. Anon-validating peer (or an endorsing peering) does not executetransactions but it may simulate and endorse them. The segregation ofpeer types/function improves the scalability of the system. An orderingservice can accept endorsed transactions, order them into a block, anddeliver the blocks to committing peers. In such distributed ledgersystems, consensus is the process of reaching agreement on the next setof transactions to be added to the ledger. In Hyperledger fabric,consensus is made up of three distinct steps: Transaction endorsement,ordering, and validation and commitment.

In accordance with an embodiment, a feature of the Hyperledger ispermissioned blockchain with immediate finality which runs arbitrarysmart contracts called chaincode. The user-defined chaincode smartcontracts are encapsulated in a container and system chaincode runs inthe same process as the peer. Chaincode execution is partitioned fromtransaction ordering, limiting the required levels of trust andverification across node types, and reducing network overhead.

In accordance with an embodiment, channels in the Hyperledger Fabricenable multi-lateral transactions with high degrees of privacy andconfidentiality required by competing businesses and regulatedindustries that exchange assets on a common network. The immutable,shared ledger encodes the entire transaction history for each channel,and includes query capability for efficient auditing and disputeresolution. A ledger is provided in the scope of a channel—it can beshared across the entire network (assuming every participant isoperating on one common channel)—or it can be privatized to only includea set of participants.

In accordance with an embodiment, the Hyperledger fabric implementssecurity through support for certificate authorities (CAs) for TLScertificates, enrollment certificates and transaction certificates.Public Key Infrastructure is used to generate cryptographic certificateswhich are tied to organizations, network components, and end users orclient applications. As a result, data access control can be manipulatedand governed on the broader network and on channel levels. This“permissioned” feature of Hyperledger Fabric, coupled with the existenceand capabilities of channels, satisfies privacy and confidentialityneeds in multi-party enterprise systems.

In accordance with an embodiment, Hyperledger Fabric provides theability to modify assets using chaincode transactions. As describedabove, Chaincode is software defining an asset or assets, and thetransaction instructions for modifying the asset(s).

Integrated consensus mechanisms have a fundamental role in transactionflow in the Hyperledger Fabric, from proposal and endorsement, toordering, validation and commitment. Consensus is, as described above, averification of the validity of a set of transactions comprising ablock. Consensus is ultimately achieved when the order and results of ablock's transactions have met the explicit policy criteria checks.

FIG. 1A illustrates transaction flow in a fabric of a system providing ablockchain service. More specifically, the figure illustrates aBlockchain Cloud Service (BCS) system in accordance with an embodiment.At 1, Client 160 uses fabric SDK 162 to access Fabric certificateauthority 170, 172, 174 to enroll. At 1.1 Fabric-CA returns anenrollment certificate to the client 160. At 2, Client 160 uses fabricSDK 162 to access Peer container 180 requesting endorsement fromEndorser 182. At 2.1 Endorser 182 returns a signed RWset (read/writeset). At 3, the fabric SDK 162 at the client 160 submits the endorsed TX(transaction) which includes RWset and endorser signatures to theordering service at the ordering container 190. At 4, Orderer 192delivers the TX batch to Committer 184 in peer container 180. TheOrderers are a defined collective of nodes that orders transactions intoa block. The ordering service exists independent of the peer processesand orders transactions on a first-come-first-serve basis for allchannel's on the network. Committer 184 applies changes to ledger 186and World State 188 at 5 and 5.1. The Fabric certificate authority 170can be used to validate signatures and authorization for the peercontainer 180, the smart contract container 166 and 168 (smartcontract), and the orderer 192. In addition, the smart contract 168 cancommunicate with the endorser 182.

In an embodiment, the system can utilize a Kafka cluster as an orderingservice. Kafka is a distributed streaming service that supports publishand subscribe semantics. A Kafka cluster runs on a plurality of serversand stores streams of records in categories called topics. Each recordcomprises of a key a value and a timestamp. Kafka can thus be used as anordering service comprising ordering service nodes (OSN-n), and a Kafkacluster. The ordering service client can be connected to multiple OSNs.The OSNs do not communicate with each other directly. These orderingservice nodes (OSNs) (1) do client authentication, (2) allow clients towrite to a chain1 or read from it using a simple interface, and (3) theyalso do transaction filtering and validation for configurationtransactions that either reconfigure an existing chain or create a newone. Messages (records) in Kafka get written to a topic partition. AKafka cluster can have multiple topics, and each topic can have multiplepartitions. Each partition is an ordered, immutable sequence of recordsthat is continually appended to. Once the OSNs have performed clientauthentication and transaction filtering, they can relay the incomingclient transactions belonging to a certain chain to the chain'scorresponding partition. They can then consume that partition and getback an ordered list of transactions that is common across all orderingservice nodes.

In accordance with an embodiment, each peer has the capability to be anendorser and a committer. There is a configuration item (e.g.,CORE_PEER_ENDORSER_ENABLED) which can enable a peer to be an endorser.When a peer joins a channel, this peer becomes a committer of thischannel. When a chaincode is installed on a peer, this peer becomes thecandidate endorser for this chaincode. When a client proposes atransaction, it is the client's choice to select which peers to be theendorsers (from the candidate endorsers).

In accordance with an embodiment, the Ordering mechanism for Ordererdelivering blocks to Peer are as follows. First, a peer (e.g., a leaderpeer) delivers a request for new blocks from Orderer by sending itsversion (the last block number). Next, an Orderer checks Peer's version:a) if it is greater than Orderer, returns an error to Peer, it indicatesthe ledger in Order are lost, and cannot be recovered from EventHub (inthis scenario, Orderer cannot continue work properly); b) if the peer'sversion is less than Orderer, then Orderer retrieves blocks from localledger, either in RAM or local file, and send back to peer; or c) ifthey have the same version, then Orderer blocks until new blocks areavailable. When a new block data cut from EventHub is ready, the Ordererwill put it into local block file or RAM, then deliver thread reads thisblock from ledger and sends it back to peer. The peer gets this block,and commits it to local ledger, and can then broadcast its latestversion to other peers.

BCS System Architecture

FIG. 1B illustrates transaction flow in a fabric of a system providing ablockchain service. More specifically, the figure illustrates aBlockchain Cloud Service (BCS) system in accordance with an embodiment.As shown, the Blockchain cloud service components are provisioned incompute space 120 (e.g., external compute space), for example on theOracle PaaS Service Manager (PSM) platform. Access to the system ismediated by the PSM API 122 and Blockchain REST API 124. ExternalCompute 120 leverages a load balancing as a service LBaaS 126 todistributed incoming transaction across the available appropriateresources.

In accordance with an embodiment, the BCS is an application-containerlayered service built with PSM platform on Application Container CloudService 128. Each of the BCS entities runs on a separate container. Eachof BCS entity is one-to-one correspondence to an application container.The Blockchain Cloud Service implements features of the Hyperledgerfabric described above. Besides the components that construct the basicfabric network, several components are developed to leverage theHyperledger Fabric into the Blockchain Cloud Service. These componentsneed separate deployment behaviors and binaries to deploy thesecomponents. A Cloud Stack Manager can be used to empower users toautomate the provisioning of all services defined by the blueprint as asingle unit that is called a stack.

In an embodiment, the BCS provides an implementation of the HyperledgerFabric which is an implementation of a distributed ledger platform forrunning smart contracts. The BCS leverages container technology to hostsmart contracts called “chaincode” that comprise the application logicof the system.

In accordance with an embodiment, the distributed ledger protocol of thefabric is run by peers. The fabric distinguishes between two kinds ofpeers: A validating peer is a node on the network responsible forrunning consensus, validating transactions, and maintaining the ledger.On the other hand, a non-validating peer is a node that functions as aproxy to connect clients (issuing transactions) to validating peers. Anon-validating peer does not execute transactions but it may verifythem. Some key features of the fabric release include permissionedblockchain with immediate finality which runs arbitrary smart contractscalled chaincode. The user-defined chaincode smart contracts areencapsulated in a container and system chaincode runs in the sameprocess as the peer. The fabric implements a consensus protocol andsecurity through support for certificate authorities (CAs) for TLScertificates, enrollment certificates and transaction certificates.

In accordance with an embodiment, the BCS entities run in layeredcontainer instances with ACCS 128. The containers are created and/orstarted by provisioning operations of the PSM. The Fabric-CA Container130, is the container in which the BCS Fabric CA (Certificate andAuthority) component is provided. The BCS Peer (Container) 132 is thecontainer in which the BCS peer network entity that maintains a ledgerand runs chaincode containers in order to perform the read/writeoperations to the ledger component is running. The BCS Orderer Container134 is the container in which the BCS orderer which provides the serviceto order transactions into a blockchain for all of channels is running.The BCS Chaincode Execution Container 139 is a container created andstarted by the peer entity. In the container, the chaincode executionunit communicates with the parent peer entity and performs encoding ofassets and transaction instructions for modifying the assets in theblockchain.

In accordance with an embodiment, the BCS Chaincode Builder Container140 is a container created and started by the peer entity. In thecontainer, the chaincode build environment is installed and deployed,and the chaincode execution unit is built in it. A client side FabricSDK 106 provides functionality for accessing the BCS. The Block ChainCloud Service also leverages Event Hub Cloud Service 150, Cloud StorageService 152, and Identity Service 154. Oracle storage cloud service isused as the storage service for BCS.

In accordance with an embodiment, Docker/Weave 141 are containerservices. Containers provide a way to package software in a format thatcan run isolated on a shared operating system. Unlike VMs, containers donot bundle a full operating system—instead using libraries and settingsrequired to make the software work are needed. This makes for efficient,lightweight, self-contained systems and guarantees that software willalways run the same, regardless of where it's deployed.

In accordance with an embodiment, each BCS instance comprises ofdifferent types of nodes. There can be few (e.g., 0 or more) to multiplepeer nodes in a BCS instance. There can be few (e.g., 0) to multipleorderer nodes in a BCS instance. There are 1 to multiple Fabric-CA nodesin a BCS instance, one per VM. BCS Gateway: There can be few (e.g., 0)to multiple BCS gateways in a BCS instance. BCS console is also acomponent of a BCS instance. There is only one BCS console in a BCSinstance.

In accordance with an embodiment, the BCS Management Server (Console)136 is a component of BCS, which provides rich monitor, management, andview functionalities to the BCS stack instance as described in moredetail below. BCS Gateway (REST proxy) 138 is a new component of BCS,and provides a REST API interface to customers/clients and is used toaccess the fabric to perform transactions as described in more detailbelow.

In accordance with an embodiment, on the public access client-side 100,A PSM Console UI 102 allows for management of Platform Service Manager.A BCS Console UI 104 allows for control of the BCS Management Server. Avariety of different client types can access the BCS service includingFabric SDK clients 106, BCS REST Clients 108, and Fabric MembershipClients 110.

In accordance with an embodiment, blueprints can be defined for eachtype of container listed of above as an individual service type. TheOracle Cloud Stack Manager uses the blueprints to automate theprovisioning of all of individual service types into a single stackunit. The benefit of defining a service type for each of BCS entity isease of upgrading and maintaining the various running entities. Theapplication container layered service supports four types of operations:CREATE_SERVICE, DELETE_SERVICE, SCALE_SERVICE, and Start/Stop/Restart.These operations can be applied service by service.

In accordance with an embodiment, in the Hyperledger Fabric Network, theordering service component uses the Apache Kafka to provide orderingservice and support for multiple chains in a crash fault tolerantmanner. Accordingly, in the BCS cloud service, the ordering servicecomponent will uses the OEHCS (Oracle Event Hub Cloud Service thatdelivers the power of Kafka as a managed streaming data platform and canbe integrated with the rest of Oracle's cloud.)

FIG. 1C illustrates a BCS system in accordance with an embodiment. Morespecifically, the figure shows a BCS runtime.

In accordance with an embodiment, clients, such as gateway-basedapplications 103 and/or fabric-based applications 105 can communicatewith an AACS instance 128, via a network, such as the internet 107, andvia a front end, such as a load balancer LBaaS 126, which can compriseCloudGate (discussed below). Incoming calls can comprise RESTcommunication (shown as the heavier dashed line in the figure), or, incertain situations, incoming gRPC communication (shown as the lighterdashed line in the figure). Incoming REST communication can be directedto a gateway 138 (which can comprise a REST API/REST Proxy), a console136, or a Agent Fabric-CA 130 (as discussed above). The RESTcommunication, now transformed/translated to internal calls (gRPC), caninterface with the instance of the blockchain fabric/Hyperledger(including the agent/peers 132, agent/orderers 134, chaincode 142, andchaincode builders 140). Meanwhile, incoming gRPC communication can bedirectly transmitted to, for example, the agent/peers 132, and theagent/orderers 134, to interface with the blockchain/Hyperledger.

In accordance with an embodiment, once transactions within the ACCSinstance have occurred, the ACCS instance can then, for example, persistthe ledger at the cloud storage via REST communication, or cancommunicate with the Event Hub, likewise via REST communication.

In accordance with an embodiment, while only one ACCS instance is shownin the figure, one of skill in the art would readily understand thatthere can exist one or multiple ACCS instances that the clients (such asgateway-based applications 103 and/or fabric-based applications 105) cancommunicate with via the described BCS runtime.

FIG. 1D illustrates a BCS system in accordance with an embodiment. Moreparticularly, the figure shows the component cardinality within a BCSsystem, namely ratios of components with respect to each BCS instance.

In accordance with an embodiment, for each BCS instance 100 a: anorderer 101 a can be provided in the ratio of 1:N; a Fabric-CAmembership 102 a can be provided in a ratio of 1:N; a BCS REST-Proxy 103a can be provided in the ratio of 1:N; a BCS console 104 a can beprovided in a ratio of 1:1, and a peer container 105 a can be present inthe ratio of 1:N.

Each peer container can comprise an endorser, which can simulate atransaction, and a committer, which can application changes to a ledger,which is also provided at the peer container.

In accordance with an embodiment, chaincode 109 a can be provided at aratio of 1:N with respect to the peer container. In addition storage 106a can be provided at a ratio of N:1 with respect to the peer containerand the orderer. As well, Even Hub 107 a can be provided at a ratio ofN:1 with respect to the peer container and the orderer. IDCS 108 a canbe provided at a ratio of N:1 with respect to the Fabric-CA membership.

Blockchain Cloud Service (BCS) Gateway

In accordance with an embodiment, BCS Gateway (BCSGVV) comprises anetwork node using Fabric SDK to communicate with Fabric network. TheBCS Gateway provides a HTTPS RESTful API to customers on the client sidewhich allows clients/client applications to interact with elements ofthe fabric of the BCS.

FIG. 2 illustrates a gateway for a Blockchain Cloud Service system inaccordance with an embodiment. As shown in FIG. 2, End User 200interacts with an application adapter 202 for authentication andauthorization using HTTPS. The application adapter 202 accesses thePublic Cloud 210 using HTTPS to a LBaaS, such as CloudGate 212 (i.e., aLBaaS). Load balancing as a service (LBaaS) is performed for incomingtransactions. CloudGate 212 passes transactions to BCS gateway 222 usingHTTPS. BCS gateway provides the interface to BCS Fabric 220 in whichcommunication utilizes gRPC remote procedure call protocol.

In accordance with an embodiment, CloudGate 212 is a reverse proxy“access enforcement module” or “policy enforcement point” that securesweb browser and REST API resources using, for example, OAuth2 and OpenIDConnect standards. IDCS uses CloudGate internally to secure its ownadministration UI and REST APIs (referred to as “IDCS Web Tier”). Forother applications, Cloud Gate: OTD is deployed as additional instancesin a semi-supported/interim setup known as Non-IDCS or Standalone.

In accordance with an embodiment, the OAuth/OpenID based authenticationsupports user browser flow (for UI client) which is triggered if theHTTP request contains a “user-agent” header, which means the request isfrom a UI like browser or mobile app. CloudGate prompts the user forcredentials (username/password), verifies the credentials, then createsand returns the OAuth session cookie which can be used by the subsequentHTTP requests from the browser. The OAuth/OpenlD based authenticationalso supports Resource Server flow (for programmatic client). This flowis triggered if the HTTP request contains an Authentication “Bearer”token header. CloudGate validates the token for authentication.

In accordance with an embodiment, for HTTP basic authentication, forevery HTTP request, the credentials (username/password) must be includedin the HTTP Authorization “Basic” header. Cloud Gate verifies thecredentials for every HTTP request. This method applies to both UIclient and programmatic client.

In accordance with an embodiment, multitoken flow is a self-adaptivemethod which covers certain HTTP requests. If the HTTP request containsan Authorization “Basic” header, CloudGate performs HTTP basic behavior.If the HTTP request contains an Authorization “Bearer” header, CloudGate behaves the same as the resource server flow.

In an embodiment, the BCS console browser client utilizes the userbrowser flow. In embodiments, for BCS console and gateway programmaticclient, the system can use CloudGate multitoken authentication method.Programmatic clients can invoke BCS REST APIs via HTTP basicauthentication.

In accordance with an embodiment, BCS gateway 222 communicates withpeers 224 which are network entities that maintain a ledger and runchaincode containers in order to perform read/write operations to theledger. Peers are owned and maintained by members. BCS gateway 222 andpeers 224 communicate with orderer(s) 226. Orderers provide orderingservices. The Orderers are a defined collective of nodes that orderstransactions into a block. The ordering service exists independent ofthe peer processes and orders transactions on a first-come-first-servebasis for all channel's on the network. Peers 224 and orderers(s) 226communicate with the Fabric certificate authority 228. BCS gateway 222also provides access to BCS Management Server/Console 230.

In accordance with an embodiment, the BCS is deployed on a cloud system,such as Oracle cloud. A gateway can be run in an ACCS container. Thegateway is stateless. A gateway can be updated by killing the oldgateway and starting a new gateway. BCS gateway can allow customerqueries or invoke Fabric chaincode by RESTful protocol. BCS gatewayallows client to access the Fabric network in Oracle cloud byHTTPS/RESTful service. The BCS Gateway is a network node using FabricSDK to communicate with Fabric network. Communication within the fabricuses gRPC as a communication protocol. On the client-side, the BCSgateway provides HTTPS/RESTful API to customer. The REST API allowsclient to invoke functions within the Fabric using the Fabric SDK.

In accordance with an embodiment, a gateway can be provided in aone-to-one relationship with a fabric user. All gateway users belong toone organization, all gateway users map to one Fabric user in onegateway. One gateway configured only one Fabric user.

In accordance with an embodiment, IDCS issues gateway certification andgateway user (“App adapter”) certification. These certifications aresigned with organization CA. Gateway and gateway users can deploy withorganization CA, so they could validate each other using HTTPS.

In accordance with an embodiment, each end user access BCSGW through“App adapter”. There are 3-tiers of authentication. End user 200 can beauthenticated by App adapter 202. App adapter 202 can be authenticatedby BCS gateway 222 with client certificate. BCS Gateway canauthenticated by peers 224 and orderer 226 in Fabric network 220.

In accordance with an embodiment, one container runs one tomcat server,deploys one BCS Gateway, mapping to one Fabric user. Multiple Appadapters could connect to one Gateway.

In accordance with an embodiment, different gateways can be associatedwith different Fabric user. End users of App adapters that connect toone gateway can map to one fabric user.

In accordance with an embodiment, BCSGW run in Oracle cloud,configuration is set by BCS console using JSON file. Admin user couldpublish part of peers, channels and chain code to Gateway. Admin userstarts Gateway by console. Gateway don't refresh configuration afterboot. Admin user can set endorsers for chain codes. End users don't knowabout policy, Gateway does not check chain code policy.

In accordance with an embodiment, BCSGW is started by BCS console. BCSconsole creates BCSGW configuration file and uses the BCSGW package tostart a new gateway. Upon startup, a startup script checks the BCSGWconfiguration file, modifies a configuration file (e.g., a Tomcatconfiguration file) for Tomcat, then starts Tomcat. Tomcat starts athread for BCSGW, the thread read configuration file, for each channel,it create a channel object, and create connections with order, peers,event hubs. Different channel will have different connection toorder/peer/event hubs. The event hub here is a second port of peer.Gateway connects to this port to get the result of transaction. Tomcatservlet container can listen and wait for client request. For chain codequery method, BCSGW send the request to all peers of the channel, andonly use the first result. For chain code invoke method, BCSGW send therequest to all endorsers of the channel, if one of them return success,BCSGW send the transaction to all orderers of the channel.

In accordance with an embodiment, an Asynchronous API is supported. Apeer can open two ports, one port if for event exchange. The gateway canconnect to the event port of peer. Gateway only need connect to oneevent port for one channel. Normal client APIs are synchronous. Atransaction may take a few seconds, client need wait for response. Sendasynchronous events to client is not in V1 plan. Besides synchronoustransaction API, Gateway provide asynchronous transaction API“asyncinvoke”.

In an embodiment, the Asynchronous API can work in this manner. Afterchecking the parameters of client request, Gateway will returntransaction ID to client. The client can be aware that the transactionis started but not finished. Gateway will start a background thread tokeep processing the transaction. The client can track unfinishedtransactions. The gateway can provide “transaction” API for client toquery transaction status using transaction ID.

In accordance with an embodiment, a client login can be supported. TheBCSGW can support HTTPS protocol, and not allow unsecure HTTP access.BCSGW uses certificates to trust app adapter or SALT. The app adaptercan authenticate end users. Tomcat needs set to use HTTPS clientcertificate authentication. The keystore file include BCSGW cert and CAcert to validate the client is provided by BCS console. The BCS gatewayprovides a BCS Rest interface for client access.

Persistence—Storage Cloud

In accordance with an embodiment, a hyperledger fabric project code hasthe blocks of the ledger being stored in the local file system and otherruntime data, like block index, state of the world, history being, andledger provider database (keeps all ledger ID and recovery status)stored in LevelDB, which is also stored in the local file system. InACCS, the container file system is ephemeral, meaning when the containeris stopped and a new container is restarted on a new VM due to somehardware failure—the file system contents may be lost. Considering asituation where all containers are lost, then there is no way to recoverledger. So ledger data must be stored outside ACCS containers. Becauseof this, a persistence solution is provisioned in the form of an objectstorage service for use by components of the hyperledger fabricdescribed above.

In accordance with an embodiment, accordingly in the BCS, thepersistence solution utilizes a Storage Cloud Service. E.g. OracleStorage Cloud Service. The ledger is backed-up to an Object Store.Ledger blocks written to container file system, but also backup toobject storage. Index & World State are recorded using the containerFile System but may be recovered from the Storage Cloud Service if acontainer is restarted. Oracle Storage Cloud is an Infrastructure as aService (IaaS) product, which provides an enterprise-grade, large-scale,object storage solution for files and unstructured data.

FIG. 3 illustrates a persistence for a Blockchain cloud service systemin accordance with an embodiment. As shown in FIG. 3, ACCS instance 300includes a plurality of containers. Containers include, for exampleOrderer containers 302, 304 having ledgers/blockchains 312, 314. Theledgers/blockchains 312 and 314 are backed up over a REST interface toan Object storage 320. Object storage 320 may be, for example a cloudstorage service.

The object storage is used to persist the ledger of each orderer. Thecurrent mechanism for Orderer delivering blocks to Peer are as follows.First, a Peer delivers a request for new blocks from Orderer by sendingits version (the last block number). next, an Orderer checks Peer'sversion, a) If it is greater than Orderer, returns an error to Peer, itindicates the ledger in Order are lost, and cannot be recovered fromEventHub. In this scenario, Orderer cannot continue work properly. b) IfPeer's version is less than Orderer, then Orderer retrieves blocks fromlocal ledger, either in RAM or local file, and send back to Peer. c) Ifthey have the same version, then Orderer blocks until new blocks areavailable. When a new block data cut from EventHub is ready, the Ordererwill put it into local block file or RAM, then deliver thread reads thisblock from ledger and sends it back to Peer. Finally, the Peer gets thisblock, and commits it to local ledger. Next, the latest version of theledger can be broadcast to other Peers.

In accordance with an embodiment, according to the above process, eitherOrderer or EventHub can have the whole blocks persisted. As describedabove, EventHub has time limited retention. If EventHub can do it, theOrderer can set Ledger type to RAM or file, once Orderer is restartedand ledger is lost, it can replay the records from EventHub and cut thebatch message into block, then can re-construct ledger. If EventHub onlysupports a limited retention period, once Orderer is restarted andledger is lost, it cannot re-construct ledger correctly because thefirst record in EventHub is not the true record in ledger. In thisscenario, Orderer cannot start the old channel because the first blockwith channel information is lost, and version number (the last blocknumber) is not correct as well.

In accordance with an embodiment, then, each orderer can persist eachblock to Oracle Storage, meanwhile save all channel IDs to an object inStorage as well. On Peer, only persist the genesis block because it hasthe channel information. For other block data, Peer can retrieve it fromOrderer once it is lost.

In accordance with an embodiment, ACCS Instance 300 can also comprisePeer Containers 306, 308 comprising ledgers 316, 318, and indices 326,328. There are five types of runtime data generated by Peer: Transactionlog (block file); Block file index (LevelDB); Ledger provider (LevelDB);State Database (LevelDB or couchdb); History (LevelDB). All transactiondata are stored in Transaction log as a linked block in local file, itmust be persisted to Oracle Storage Cloud service. Ledger provider DBkeeps all ledger ID and recover status in LevelDB. The ledger ID is theunique id to identify a channel that a peer belongs to. It must bepersisted to Oracle Storage Cloud Service. For others, Peer can recoverit automatically at runtime, so keep them in local file system.

In accordance with an embodiment, Oracle Storage Cloud Service providesREST API for uploading/downloading file to/from an object. When a newblock is generated, first, it will be written into a local block file asbefore, the difference is one block per file. Next, this block file willbe uploaded to Oracle Storage as an object. If it fails, the changes inlocal file will be rollback, and an error will be returned to caller.

In accordance with an embodiment, for block file index, when Ordererupdates a latest checkpoint, the information can be persisted to OracleStorage first, then update local LevelDB. If the event that theoperation fails, an error can be returned to the caller. Thisinformation will be used for the recovery for block file index. InOracle Storage, each Peer and Orderer has unique container name that'sthe combination of msp id and node id. The object name is name of blockfile prefixed by channel name. For more details, see section NameConvention in Oracle Storage.

In accordance with an embodiment, a save Ledger provider DB to OracleStorage option can be provided. For ledger provider DB, the entireLevelDB can be replicated to Oracle Storage Cloud Service once it isupdated. This file is very small, and the update is not frequent, so theoverhead on the replication can be ignored. When container is restarted,it can be download it from Oracle Storage Cloud Service if exists. IfOrderer is restarted from a new container, it will download channel idfrom a Storage object first, then get latest checkpoint from Storage bychannel id. Next, start recovery block index from the first block tolast block. During this period, the block file will be downloaded one byone. After that, Orderer starts to recover State DB and History DB. IfPeer is restarted from a new container, it will download Ledger ProviderDB first, then it can get all ledger id. Next, get the related genesisblock from Storage by ledger id. Peer starts with the configuration ingenesis block and deliver a quest to Orderer to get other block data.After Peer gets these blocks, it starts to recovery block index, stateand history DB.

In accordance with an embodiment, the local block file acts as a readcache. The query will read data from local first, if it doesn't exist,then download from object storage. Besides ledger, the source codes ofchaincode need to be persisted to Oracle Storage. In current Fabric, anencoded source code will be stored on peer after chaincode is installed.Peer will check chaincode container for each Invoke or Instantiate, ifthe container doesn't exist, peer will rebuild it from source code. So,it can be upload it to Oracle Storage for each chaincode installation,and download it when peer is restarted from disk failure.

BCS: SDK Based Configuration File Operations and Post-ProvisionDeployment

In accordance with an embodiment, configuration files and deploymentfunctions deploy, initiate generate, update and get configurations aboutthe applications include peers, orderers, CA servers and chain code whendeploy or update the applications. These functions reside at both BCSconsole (in Node.js) and Fabric containers (peer/orderer/chaincodecontainer). The functions will get/update configurations as requestedfrom UI, and call SDK APIs to activate the configuration changes whenneeded. The component as part of BCS console backend interacts with theBCS console UI, IDCS backend SDK, and all the BCS applications toprovide the SDK for UI operations get/update configurations asrequested. The component also helps to provision the BCS applications.The BCS provision component will deploy the BCS applications into theDocker containers of the VMs created using PSM. This feature willimplement SDK API for BCS console UI and BCS provision components get orupdate BCS applications configurations and deployment inpost-provisioning phase. In the post-provisioning phase, theprovisioning system will deploy BCS applications such as CA server,orderer, peer, under Docker/Swarm. When the VM startup, it will callstartup script to perform post-provisioning and VM initial work.

In accordance with an embodiment, configuration files are provided forFabric components including peers, orderers, Fabric CA and BCS Gateway.BCS applications packages, configurations, chaincode store in Customer'sStorage Cloud Service.

In accordance with an embodiment, the provision system should completeall the resources allocation. The resources include VMs, Network, andStorage.

In accordance with an embodiment, the provision system should save allthe resources allocation information to the storage service. Theinformation includes the VM number and their network addresses/accountcredentials, BCS application number in each VM and their type, publicand internal IP. And there should also be enough internal IP addresses(accessible among VMs) for containers.

In accordance with an embodiment, when the BCS provision component hasdone the provision work, the VM startup script will start, then callswarm deploy the application container, and inside the container, thecontainer startup.sh script to perform initiation operation.

In accordance with an embodiment, the BCS console will get theconfigurations from storage service when it starts, and will save theinput of the user operation from UI back to storage service, and thensend restart command to swarm.

In accordance with an embodiment, the security certificates needed canbe saved in IDCS. Alternatively, the security certificates can beretrieved from IDCS.

In accordance with an embodiment, a BCS console backend can communicatewith the BCS applications with swarm.

In accordance with an embodiment, when the BCS application containerstarts up, the BCS application can gather configuration details todecide its application type (peer or chaincode container or other), andthen load the configuration needed.

In accordance with an embodiment, this component updates theconfiguration and provides BCS application startup shell code. The BCSget/update configuration file operation can be split into several parts.First, the BCS console will get configuration from storage when itstarts, and save configuration into storage from BCS console when needupdate (shell and Node.js). When the BCS application container startsup, the startup script (in each Docker container) will start first thenget configuration for its application type and get the app cert fromIDCS (shell). When the BCS console UI restarts a BCS application, itsends message to the Docker/Swarm to restart the application in thecontainer.

In accordance with an embodiment, the BCS console is stateless, and,when started, can gather all the BCS instance configurations andconnects to the BCS applications and monitors them. The configurationswill be obtained from a storage service via backend API. When anyconfigurations change, the BCS console will call backend API to save theconfigurations back to storage service and restart related applications.When the customer changes the configuration items via BCS console UI,the UI will encode the configurations into key/value data, the backendcode will transform it to file and save into the storage service. TheBCS console can monitor, start and stop the BCS applications. The startand stop commands use Docker/Swarm APIs to implement this function.

Deployment of a Fabric Network

In accordance with an embodiment, a Fabric Network comprises thefollowing entities: peers, clients, ordering service, and a set ofprotocols to facilitate the communications among these entities.Organizations are logical entities or corporations that constitute thestakeholders of a Fabric network. A Fabric network has multipleparticipating organizations. Member: A legally separate entity that ownsa unique root certificate for the network. Network components such aspeer nodes and application clients will be linked to a member. Eachorganization may have one or more members. One organization cancontribute both orderers and peers, or orderers only, or peers only.

The first step in deploying a Fabric Network is defining theparticipants. This step is done out-of-the-band of Fabric network. Allparticipating organizations of a Fabric network negotiate and concludethe composition of the network including, for example, whichorganization(s) contribute orderer nodes, and which organizationscontribute peer nodes. Every organization which contributes orderernodes publishes the root certificate for its orderer servers. Everyorganization which contributes peer nodes publishes the root certificatefor its peer servers. Every organization which has clients publishes theroot certificate for its clients. Clients can be separated from peers todifferent members in one organization.

As an example, four banks (bank1, bank2, bank3, and bank4) have decidedto deploy a Blockchain network using an ordering service that wouldcomprise orderer nodes owned by bank1 and bank2. And bank1 is only tocontribute orderers in this network. Each bank is an organization of theFabric network: bank1 has 1 member: orderers(root_cert_1); bank2 has 3members: clients(root_cert_21), peers(root_cert22), orders(root_cert23);bank3 has 2 members: clients(root_cert31), peers(root_cert32); bank4 has2 members: clients(root_cert41), peers(root_cert42).

After defining the participants, certificates are generated for orderersand peers. Each orderer or peer needs a (private key, signingcertificate) pair to identify itself. Each member can configure andstart its own Fabric CA server with its root certificate, and use CLI orSDK to request the CA server to generate the (private key, signingcertificate) for each orderer/peer server of this member. BCS provides aFabric CA server which can provide certificates. However, Fabric CAserver is not the only approach to generate certificates. User can useother CA system to do the same. So Fabric CA server is not a mandatorycomponent in a Fabric network.

After generating certificates for the orderers and peers, a Fabricnetwork is bootstrapped by creating the system channel. There is exactlyone system channel for an ordering service (so for one Fabric network),and it is the first channel to be created (or more accuratelybootstrapped). The system channel defines the composition of a Fabricnetwork:

One Ordering service

-   -   One or more Orderer organizations. Each org's        -   MSP ID        -   Certs    -   Ordering service attributes (e.g. type—solo or Kafka, orderer        addresses, batch size/timeout)    -   Policies (who can create channels, etc.)

One or more Consortiums. Each consortium contains

-   -   One or more peer organizations. Any peer organization which        wants to participate in this Fabric network must be defined here        in one of the consortiums. Each org's        -   MSP ID        -   Certs        -   Anchor peers

After a Fabric network system channel is bootstrapped a genesis block iscreated for the system channel (first block in the chains). The Ordererservice administrator generates the genesis block for the systemchannel. The genesis block can be generated either by tool configtxgen(genesismethod=file), or during orderer startup(genesismethod=provisional). When generating genesis block using theconfigtxgen tool, you must compose a configuration file configtx.yaml asthe input. This file contains the following information: The rootcertificates of all orderer organizations in the Fabric network; Theroot certificates of all peer organizations; Ordering serviceattributes: orderertype, address, batchtimeout, batchsize, kafka;Policies; Channel reader: authenticate & validate channel deliveryrequests; Channel writers: authenticate & validate channel broadcastrequests; Chain creators: evaluate chain creation requests; Admins:authenticate & validate channel reconfiguration requests;

The Orderer service administrator starts an orderer server withconfiguration file and the genesis block. This creates the systemchannel using the genesis block. A configuration file orderer.yaml isneeded for starting an Orderer server: Listen address/port, ledgertype,etc.; LocalMSP (private key, signing certificate). Each organizationwhich provides ordering service starts its orderer servers (no genesisblock should be specified).

Each organization which contributes peer nodes prepares a configurationfile (default location/etc/hyperledger/fabric/core.yaml) for each peerto specify: LocalMSP (private key, signing certificate) to identify thepeer; and Peer attributes: Listen address/port, bootstrap peers, gossipattributes, etc. And then starts the peer servers.

After the orderers and peers are started, the channel administrator (whohas the privilege to create channel) uses Fabric CLI or SDK to requestan orderer to create a channel with the following input: One consortium(must have been defined in the system channel); and one or more Peerorgs in the consortium. Each participating organization uses Fabric CLIor SDK to join some of its peers to the newly created channel.

Example: Deployment of a Fabric Network on BCS

FIG. 4 illustrates an example deployment of a fabric on BCS.

More particularly, the figure and description describe the steps todeploy a Fabric Network on BCS. In this example, four entities A, B, C,and D want to create and join a Fabric Network. The four entitiesdiscuss off-line and decide responsibilities of the various entities.Each entity creates one or more BCS instance on OPC.

In accordance with an embodiment, Entity A provides both orderers andpeers. Entity A creates two instances: Orderer_Org1 401 for orderers andPeer_Org1 421 for peers. Entity A is also responsible for creating theFabric network (note: only an orderer can create a Fabric network). Theordering service 400 comprises Orderer_Org1 401 and Orderer_Org2 402 aswell as Kafka cluster 410.

In accordance with an embodiment, Entity B provides both orderers andpeers. Entity B creates two instances: Orderer_Org2 402 for orderers andPeer_Org2 422 for peers.

In accordance with an embodiment, Entity C provides only peers. Entity Ccreates instance Peer_Org3 423.

In accordance with an embodiment, Entity D provides only peers. Entity Dcreates instance Peer_Org4 424.

In accordance with an embodiment, the administrator of each BCS instancecollects the CA certificate and admin certificate of the current orgfrom BCS console. The administrator of each peer org identifies theanchor peers of the current org and collects the IP/port of the anchorpeers. The four entities exchange all the collected information witheach other off-line.

In accordance with an embodiment, from the BCS console, theadministrator of Orderer_Org1 creates the Fabric network by creating thesystem channel with the following information collected in previousstep: the CA certificate and admin certificate of each org; and theanchor peers of each peer org. The backend work includes invoking Fabrictool to create genesis block and configuring orderer to create thesystem channel using the genesis block.

In accordance with an embodiment, from the BCS console, theadministrator of each peer org joins the Fabric network by updating theconfiguration of all peer nodes to add the CA/admin certificates ofother orgs collected, and restarting all the peer nodes.

In accordance with an embodiment, in a system, a method is provided toallow a new org to join an existing Fabric network. Furthermore, auser-friendly method can be provided to facilitate the communicationsamong participants in order to create/join Fabric network, e.g. to coverthe off-line actions in preliminary to forming the fabric.

Chaincode (Smart Contract) Container

In accordance with an embodiment, and as discussed above chaincode issoftware defining an asset or assets, and the transaction instructionsfor modifying the asset(s). Chaincode enforces the rules for reading oraltering key value pairs or other state database information. Chaincodefunctions execute against the ledger current state database and areinitiated through a transaction proposal. Chaincode execution results ina set of key value writes (write set) that can be submitted to thenetwork and applied to the ledger on all peers.

In accordance with an embodiment, to support the consistent update ofinformation—and to enable a number of ledger functions (transacting,querying, etc.)—a blockchain network uses smart contracts to providecontrolled access to the ledger. Smart contracts can encapsulateinformation, replicate it automatically across the fabric, and they canalso be written to allow participants to execute certain aspects oftransactions automatically.

In accordance with an embodiment, Hyperledger Fabric smart contracts arewritten in chaincode and are invoked by an application external to theblockchain when that application needs to interact with the ledger. Inmost cases chaincode only interacts with the database component of theledger, the world state (querying it, for example), and not thetransaction log.

In accordance with an embodiment, Hyperledger fabric utilizes the Dockerengine to build chaincode, deploy it and keep it running. This sectiondescribes the fabric architecture and how it is integrated into an ACCSlayered model for BCS.

In accordance with an embodiment, fabric deploys and manages userchaincode as follows: First build the chaincode in an ephemeral CC envcontainer. Second, the chaincode is transferred as source code into thebuilder container, compiled with needed libraries statically linked(“Java build”), then the binary is sent back to the peer. The staticlink allows the actual chaincode container to be as small as possible.Third, build a chaincode image and container and start it. The chaincodecontainer then remains running until the peer is shut down or thechannel terminated. Should the chaincode container crash or be killed,if the image exists it is re-started on the next invocation. The designis to have one chaincode Docker container per peer and channel.Chaincode is explicitly installed on peers. That is: not all peers thatjoin a channel necessarily have chaincode installed.

In accordance with an embodiment, users can deploy a fabric network inACCS layered containers, which have the ability to transparentlydistribute components such as peers, orderers and chaincode. Chaincoderuntime environment containers (ccenv) will be dynamically started asACLS containers Chaincode binary will be saved in Cloud Storage sincelocal block storage is not considered a reliable way of recovering. Oncebuilt chaincode binaries will be uploaded to Cloud Storage for recoverypurposes in case of container crash.

In accordance with an embodiment, each chaincode interaction cancorrespond to various functions of chaincode. The only restriction isthat chaincode cannot be invoked or queried until it is instantiated.Additionally, upon any invocation the chaincode container is re-startedif it cannot be found running.

FIG. 5 illustrates a chaincode architecture, in accordance with anembodiment. More specifically, the figure illustrates a chaincodearchitecture which allows a client 530 to install chaincode and runtransactions in ACCS environment 500 according to an embodiment. Step 1,Client 530 installs chaincode source code to a Peer 1, 510. First buildthe chaincode in an ephemeral CC env container. When a client 530performs “install”, it will: start a builder container, which willautomatically start a builder agent, wait for the builder container tofinish initializing, send the chaincode source code to the buildercontainer via peer, (step 2). The builder agent will build chaincode(Java build). The chaincode is transferred as source code into thebuilder container, compiled with needed libraries statically linked(“Java build”), then the binary is sent back to the peer. The staticlink allows the actual chaincode container to be as small as possible.Once built, the chaincode package (tgz file) will be uploaded to CloudStorage 560 (step 3). The builder agent will send the Cloud Storagelocation to the peer for later reference (step 4.2).

In accordance with an embodiment, the peer 510 will then start the CCenv as an ACLS (Access Control Lists) container 520, using the PSM RESTAPI. Build a chaincode image and container and start it. The chaincodecontainer then remains running until the peer is shut down or thechannel terminated. The peer 510 will pass the chaincode ID, self IP(for chaincode registration) and Cloud Storage location to ACLScontainer start (step 4.1). The peer will wait for chaincode to start,or time out after a set period. The ccenv will start the chaincode. Uponstartup, the chaincode will register itself with the peer step 4.3). Thechaincode will be ready for invocation in transactions (step 5), whichwill be performed using the connection established at registration time.

In accordance with an embodiment, the builder container 550 comprises asimple REST-type server. The builder container 550 comprises builderagent 553. The builder container 550 starts up and listens for achaincode build request. When the builder container 550 receives a buildrequest, e.g.: POST call with base64 encoded source code as body itbase64 decodes the source code and saves the chaincode source code inlocal filesystem. The builder agent 553 then performs “Java build” onthe source code. If “Java build” is successful, the builder agent 553package binaries and upload to Cloud Storage 560. The builder agent alsoreturns the chaincode location to the peer. If “Java build” fails, theagent returns the error and reason to the peer.

BCS Management Console

As described above, each instance of a BCS can include a managementconsole, which can be used to manage and monitor the BCS instance,including the BCS Gateway, BCS nodes, and BCS channels.

In accordance with an embodiment, the system for providing a managementconsole can include a web application running in a script runtimeenvironment, for example, Node.js. The web application can be built on agraphical user interface framework and a web framework; and can includea plurality of custom functions or APIs to communicate with variousnodes or services in a BCS instance. The web application can populateinformation from the various nodes or services in the BCS instance intoa view object, for display in a console user interface. The managementconsole can also provide functionalities for an administrator to start,stop and update one or more nodes in a BCS instance. A set of managementREST APIs can be provided by the script runtime environment or can beaccessed by the script runtime environment, to support the samefunctions as provided by the web application.

In accordance with an embodiment, the system can facilitate themonitoring and management of the associated BCS instance through a webinterface provided by the web application, or through a custom RESTclient application written using the set of management REST APIs.

In accordance with an embodiment, the management console can enable aBCS administrator to manage a plurality of components of the BCSinstance, including one or more peer nodes, one or more orderer nodes,one or more Fabric-CA nodes, one or more BCS gateway nodes, channels,and one or more chaincodes.

In accordance with an embodiment, managing a BCS component can includeperforming one or more of the following operations: starting thecomponent, stopping the component, adding the component, removing thecomponent, viewing/editing attributes of the component, viewingperformance metrics of the component, and view logs of the component.

FIG. 6 illustrates a system for providing a management console inaccordance with an embodiment.

As shown in the figure, a BCS management console 136 can be provided asa component of a BCS instance in the application container cloud service128. The BCS management console can be a web application running in ascript runtime environment 605, which can represent a runtimeenvironment provided by Node.js.

In accordance with an embodiment, within the management console, therecan be a Fabric node SDK 611, a plurality of Fabric custom functions613, and a plurality of ACCS APIs 615. The SDK, custom functions andACCS APIs can be used to communicate with a Fabric network 601, whichcan comprise a distributed streaming service (e.g., Kafka) 603. Themanagement console can further include a view object 623 that cancontain information that needs to be displayed in the BCS console UI 104or a REST-client 604, or contain information that needs to be passedfrom the BCS console UI or the REST-client to the management console. AFabric node SDK 611 can operate to map the information from the Fabricnetwork and the information the BCS console UI or the REST-client.

In accordance with an embodiment, the BCS management console can furtherinclude a GUI framework (e.g., JET) 617 and a web framework (e.g.,Express) 619. The GUI framework can provide a variety of user interface(UI) components and elements that can be used in the management consoleweb application. For example, the UI components and elements can be usedto create forms, collect data, and visualize data. The web framework canbe written in JavaScript and can provide a web application frameworkincluding a robust set of features to develop web and mobileapplications.

FIGS. 7A-7B illustrate examples of user interfaces in a BCS console UIin accordance with an embodiment.

In accordance with an embodiment, as shown in FIG. 7A, a BCS summary 711can be displayed in a dashboard. The summary can include the number oforganizations, the number of peers, the number of orderers, the numberof channels and the number of chaincodes.

In accordance with an embodiment, health information 713 of the BCSinstance can be displayed. The health information can be visuallydisplayed and numerally displayed. The sample UI can also displaytransaction execution 714 and ledges summary 715.

In accordance with an embodiment, FIG. 7B illustrates information forall the nodes in the BCS instance. For example, the sample UI shows atotal of 5 nodes, including 2 peers, 1 order, 1 Fabric-CA, and 1 RESTproxy (within a BCS gateway node). For each node, the summary UI 717displays the name of the node 723, the route information of the node725, the type of the node 729, and the status information of the node731. The sample UI include a button 721 for an administrator to addnodes, and one or more dropdown lists 719 to filter the nodes.

Node Management

In accordance with an embodiment, there can be two entities that canmanage a BCS instance using the management console: BCS administratorand BCS user. There is only one BCS administrator account for each BCSinstance. The BCS administrator account can be created when the BCSinstance is created. The BCS administrator can be bundled with theFabric-CA administrator (i.e., all the actions that the BCSadministrator performs from the BCS console or via BCS management RESTAPIs use the Fabric-CA administrator identity). There can be more thanone BCS user account, which can be created by BCS administrator byregistering a Fabric-CA identity.

In accordance with an embodiment, the nodes in a BCS instance can bedisplayed in one web page. The management console can support two modes.In the first mode, the name, type, access URL, and status of each nodecan be presented as a list. In the second mode, the channels that eachpeer participates in can be presented in diagram.

Further, in accordance with an embodiment, the management console canenable a BCS administrator to start and stop a peer node, an orderernode, a Fabric-CA node, and a BCS gateway node; and add and remove apeer node, an orderer node, and a BCS gateway node. A Fabric CA nodecannot be added or removed.

In accordance with an embodiment, when adding a node, the BCSadministrator can set the attributes of the node. The newly added nodecan be started automatically as part of the add operation. When a nodeis removed, the node is stopped and removed from the BCS instance.

In accordance with an embodiment, the BCS console UI can list all thechannels that an active peer node participates in, and all thechaincodes that are installed on the active peer node.

In accordance with an embodiment, when managing peer nodes, the BCSadministrator can join an active peer node to an existing channel, andview and edit the attributes of an active orderer node. A BCS user canview some of the attributes of an active peer node.

Further, snapshot performance metrics for an active peer node can bedisplayed in the BCS console UI, such as: memory usage, CPU percentageused, Network I/O, and Disk I/O.

In accordance with an embodiment, when managing orderer nodes, the BCSadministrator can view the logs of an active orderer node, view and editthe attributes of an active orderer node. A BCS user can view some ofthe attributes of an active peer node. Similarly to managing a peernode, the BCS administrator can view the following snapshot performancemetrics for an active orderer node: memory usage, CPU percentage used,Network I/O, and Disk I/O.

In accordance with an embodiment, when managing Fabric CA nodes, the BCSadministrator can view and edit the attributes of an active Fabric CAnode, get the CA certificate from the active Fabric CA node, and viewthe logs of the active Fabric CA node. Further, the BCS administratorcan view the following performance metrics of the active Fabric node:memory usage, CPU percentage used, Network I/O, and Disk I/O.

As described above, managing a BCS gateway node can include adding ormore removing a BCS gateway node. Since a maximum number of allowed BCSGateway nodes is designated at the time a particular BCS instance isinstantiated, the number of BCS gateway nodes that can be added to theBCs instance is limited by the configured maximum allowed number of BCSGateways.

In accordance with an embodiment, each BCS gateway node can have a name,which is the globally unique identity of the gateway node. The name canbe referred to in the future when the BCS gateway node is configured.The network address can also be determined and displayed when creating aBCS gateway node.

In accordance with an embodiment, when configuring a BCS gateway node,the BCS administrator can define a BCS gateway configuration file, andbootstrap the BCS gateway node. When a BCS instance is beingprovisioned, there may not be any channel created or chaincode deployed.As such, the BCS gateway node is not functional, until one or morechaincodes are deployed, and a valid BCS gateway configuration isdefined through the management console.

For each BCS gateway node, there can be a configuration page. Belowitems, in certain embodiments, can be configured in the configurationpage:

-   -   1). Channels: Choose which channels to expose through the        current gateway node.    -   2). Chaincodes: Chose which instantiated chaincode to expose        from a list of all instantiated chaincodes in each channel.    -   3). Endorsers: For each chaincode, define the endorsing peers.    -   4). Generate the BCS gateway configuration according to the        settings described above. Once a valid configuration file is        generated for the BCS gateway, the gateway can be started.

In accordance with an embodiment, the BCS console allows a view of BCSgateway properties using a list view function. On the list view, belowinformation is provided for each BCS gateway:

-   -   1). Name: the global unique name designated when the gateway is        created.    -   2). Fabric identity name: Each BCS gateway can be associated        with a Fabric client identity, which is registered and enrolled        when the BCS gateway is created. All the actions that the BCS        gateway takes (e.g. invoke, query) can be entitled as this        Fabric client.    -   3). Network address: The accessing point with a public internet        network address.    -   4). Status: Up or down.

In accordance with an embodiment, the management console also allow theBCS administrator to view the logs of an active BCS gateway node, andview the following BCS gateway metrics:

-   -   1). Connected clients: Client name, address, logon time, etc.    -   2). Current transaction information: current transaction        information can be available along with state information, i.e.        in what state this transaction is in. The current transaction        information can be useful in debugging a hung transaction.    -   3). Transaction statistics: Transaction statistics can be        available through the management console UI. For example, the        transaction statistics can include the number of transactions        completed, the number of event notifications received, and the        number of event notifications delivered.    -   4). Memory usage.    -   5). CPU percentage.    -   6). Network I/O.    -   7). Disk I/O.

Channel Management

In accordance with an embodiment, a BCS user can list all channels thatthe current BCS instance participates in. The BCS administrator cancreate a channel with a channel name, a consortium name, and one or moreorganization names as inputs. Output can also be displayed to indicatethe success or failure of the channel creation.

In accordance with an embodiment, a BCS user can view the participatingnodes and organizations of a channel. The management console can supporttow view modes: list mode and topology mode. In the list mode, theparticipating local nodes and external organizations (represented by itsanchor peer) can be listed as a list. In the topology mode, theparticipating local nodes and external organizations (represented by itsanchor peer) can be represented in a topology diagram.

In accordance with an embodiment, the BCS administrator can query theledger of a peer in a channel. The ledger can comprise of a list oftransaction blocks, each of which blocks can contain a block ID, aprevious hash, a data hash, a timestamp, a transaction ID list, actions(1 . . . n), a chaincode ID, a chaincode proposal, a response (r/w set,events, success or failure), and one or more endorsers. The followingstatistics data can also be displayed: a number of blocks, and a numberof invocations.

In accordance with an embodiment, the BCS administrator can list all thechaincodes instantiated in a channel. The listed items can include thechaincode ID and version. The BCS administrator can also view thefollowing information of an instantiated chaincode: Path, which is thepath as specified by the instantiated transaction; and instantiationarguments.

In accordance with an embodiment, the BCS administrator can upgrade aninstantiated chaincode in a channel. The upgrade operation can take thefollowing inputs: target endorsing peers with the new version of thechaincode installed; one or more orderers; chaincode version; andarguments, which optionally can be String array arguments specific tothe chaincode. The output of the upgrade operation can be a success or afailure with error messages.

Chaincode Management

In accordance with an embodiment, the BCS administrator can list all thechaincodes installed on any peers of the current BCS instance. Thelisted item includes the chaincode ID and version. In addition, the BCSadministrator can also view the following information of an installedchaincode: local peer nodes with the installed chaincode, and channelsthat have instantiated the chaincode.

In accordance with an embodiment, through the management console, theBCS administrator can install chaincode to one or more local peer nodes.The input for the installation operation can include: target peers;chaincode type, for example, golang/Java; chaincode ID which can be thename of the chaincode; chaincode version; chaincode path which can bethe location of the source code of the chaincode; and chaincode package,which is optional. The output of the installation operation can be asuccess or a failure with an error message.

In accordance with an embodiment, the BCS administrator can instantiatean installed chaincode to a channel, with the following information asthe inputs: channel name; target endorsing peers with the chaincodeinstalled thereon; orderer; arguments which can be optional and can beString array arguments specific to the chaincode; and endorsementpolicy, with a defined format or a default format in the absence of adefined format.

Membership Management

In accordance with an embodiment, the BCS administrator can list all theidentities in the current BCS instance, register a new user/identity forthe current BCS instance, deregister an identity, and remove the userfrom the current BCS instance. Further, the BCS administrator canview/edit the following attributes of an identity, as shown in Table 1:

TABLE 1 Attribute Type Access Descriptions Roles Orderer, Peer, R RApplication, User Affiliation BCS Administrator R The application rolesof IDCS Smart-Contract Dev BCS application which is Smart-Contract Userassociated with the current user. IsEnrolled Boolean R R

In accordance with an embodiment, the management console enable a BCSuser can enroll or reenroll itself, which can generate a private key andcertificate for the user. The management console also enable the BCSadministrator to revoke an identity which was enrolled before, andenable a BCS user to change its password.

In accordance with an embodiment, the BCS management console can bestarted or stopped along with the start or stop of the associated BCSinstance.

In accordance with an embodiment, there can be two ways to set the loglevel of the BCS management console: from the BCS management consoleitself, and use the management REST APIs to change the log level atruntime.

REST API

As described above, communication among different components within aFabric network is based on gRPC protocol. As such, a BCS instance basedon the Fabric network would require a client application to use a FabricSDK to call a chaincode in the BCS instance.

Requiring a client application to use a Fabric SDK to communicate withthe blockchain cloud service can partially cancel out the benefits ofproviding the blockchain framework as a cloud service. For example, oneof the benefits is that the cloud service should be accessed fromanywhere with an internet connection.

In accordance with an embodiment, the system and method described hereincan provide a REST proxy within the BCS instance. The REST proxy canprovide a plurality of REST APIs for use by REST clients to querythrough chain codes, synchronously or asynchronously invoke transactionsthrough chain codes, get transaction statuses, and get BCS proxyversions. The REST proxy can authenticate REST calls from REST calls,and translate the REST calls into GRPC calls. The REST proxy furtherprovide REST APIs that support the same functions which are provided bythe BCS management console.

In accordance with an embodiment, the REST proxy provide a userinterface for client applications to consume the BCS instance.

FIG. 8 illustrates a system for providing a REST proxy in a BCS instancein accordance with an embodiment.

As shown in FIG. 8, the REST proxy 138 can include a REST authenticator827 and a protocol converter 829. When the BCS REST API client 808 sendsa REST call 815 to the REST proxy, the LBaaS 126, which is connected tothe cloud gate 811, can authenticate the call to determine whether theREST call include a valid user name and a valid password to allow theREST to access the BCS instance.

In accordance with an embodiment, if the REST call is authenticated bythe LBaaS, the LBaaS can direct the REST call to the REST proxy, whichcan forward the REST call 835 to an IDCS 813 to determine whether theclient application has been granted appropriate authorization with theBCS.

In accordance with an embodiment, if the client application isappropriately authorized, the REST proxy can translate/convert the RESTcall into a gRPC call 825, and send the GRPC call to the Fabric network601. The REST call, once transformed/translated to internal calls(gRPC), can interface with the instance of the blockchainfabric/Hyperledger.

In accordance with an embodiment, the REST call can be translated by theprotocol convertor, which can be a Java application based on a FabricJava SDK 831 with a GRPC library 833.

As further shown in FIG. 8, the REST proxy can communicate with themanagement console as described above using REST 821, to expose one ormore functionalities provided by REST APIs 823 to the managementconsole.

Example REST APIs

In accordance with an embodiment, before invoking the REST API for a BCSinstance, the REST Proxy needs to be up and running. The status of theREST proxy can be check through the management console. If the RESTproxy is not up and running, it needs to be started from the managementconsole.

In accordance with an embodiment, the REST APIs can be invoked tointeract with smart contracts (chaincode) deployed on peer nodes in aBCS instance. The deployment process can be accomplished through themanagement console.

In accordance with an embodiment, provided are example REST APIs, whichare provided for the purpose of illustration. The examples used hereinassume the following example chaincode is deployed to the BCS network.

Function Name Input Parameters Function Description funcquery Args[0]:account A This function is to query the information for the specifiedaccount A, and then returns the account information. funcinvoke Args[0]:account A This function performs a Args[1]: account B transaction, whichmoves Args[2]: amount of amount of money C from money C account A toaccount B.

In accordance with an embodiment, further, the examples the managementconsole. If the REST proxy is not up and running, it can be started fromthe management console.

In accordance with an embodiment, the REST APIs can be invoked tointeract with smart contracts (chaincode) deployed on peer nodes in aBCS instance. The deployment process can be accomplished through themanagement console.

In accordance with an embodiment, provided are example REST APIs, whichare provided for the purpose of illustration. The examples used hereinassume the following example chaincode is deployed to the BCS network.

In accordance with an embodiment, the REST API provides the followingfunctionalities: Query through chaincode; Invocation of transactionthrough chain code; Async-invocation of transaction through chain code;Get transaction status; and Get BCS gateway version. Clients access theBCS gateway using HTTPS and utilize messages format according to the APIin order to perform these functions.

In accordance with an embodiment, the functionality Query throughchaincode invokes the chain code to perform query action, the chain codeand arguments for query are specified through REST API. Get Transactionstatus: This REST API query the channel for transaction status, thechannel and transaction ID are specified through REST API. Get GatewayVersion. This REST API returns the Gateway version info.

In accordance with an embodiment, the functionality Invocation ofTransaction through chaincode: This REST API invokes the chain code toperform transaction action, the chain code and arguments for invocationare specified through REST API. This REST API performs the transactionin synchronize mode, which means the response is sent back in any of thefollowing three cases: The transaction is done successfully; thetransaction is failed to be done; or the transaction time outs.

In accordance with an embodiment, the functionality Async-Invocation ofTransaction through Chain Code: This REST API invokes the chain code toperform transaction action, the chain code and arguments for invocationare specified through REST API. This REST API performs the transactionin asynchronous mode, which means a response/acknowledgement is sentback immediately after the transaction is submitted without waiting forthe complete or timeout of it. Results may then be providedsubsequently. BCS Instance Management REST APIs are provided to supportthe same functions which are provided by BCS console (described below).

Fabric Certificate Authority (Fabric CA) Integrated with Identity CloudService (IDCS)

In accordance with an embodiment, Fabric-CA server provided themembership service for Fabric. It includes three parts: authenticationfor user, authorization for accessing a Block chain (a group of peersand orders) and CA server which could deliver certificate to applicationclient, peer and order. Fabric-CA use certificate to implementauthentication and authorization. The certificate include two types:enroll cert for authentication and transaction cert for authorization.IDCS also provide authentication and authorization. But itsauthorization is implemented by OAuth. That means if the peer wants toaccess the order, the peer should get the access token of user from IDCSand use this token to access order.

In accordance with an embodiment, Fabric CA uses Database or LDAP tostore Fabric CA's registered user's info, e.g., user's name/password,user's certification, and user's affiliation. The end user of the PublicCloud (OPC) would apply one centralized IDCS instance to manage theiremployees to access all of their applied Public Cloud (OPC) instances.The Blockchain Cloud Service BCS preferably integrates with IDCS usedfor other cloud services. Thus, the end user is enabled to apply onecentralized IDCS instance to manage their employees to access all oftheir applied Public Cloud (OPC) instances, included BCS.

In an embodiment, the Blockchain Cloud Service (BCS) uses OracleIdentify Cloud Service (IDCS) to store user information in a centralizedmanner. The BCS stores Fabric CA user's information into IDCS andthereby allows Oracle BCS to use IDCS to manage BCS user's infocentralized across multiple Public Cloud service instances. Thus, in anembodiment, BCS Fabric CA user's info, certificates, are stored inOracle IDCS. The Fabric Certificate Authorization framework is a Fabricmembership provider (MSP) which includes PKI private key, signedcertificates, CA certificate chains, and it is set up by Fabric CAclient/server.

In accordance with an embodiment, BCS leverages the user management ofOPC. Any BCS user must be an OPC user (so an IDCS identity) first. Whena BCS instance is created, several types of applications are created:BCS console, CA, and REST-proxy. For the console, there are two appRoles: console admin and console user. For CA, there are four app Roles:Fabric admin, Fabric client, Fabric peer, Fabric orderer. ForREST-proxy, there are at two app Roles: gateway admin, and gateway user.

In accordance with an embodiment, in order to become a BCS user, an OPCuser needs to be granted with certain BCS appRoles in OPC usermanagement console.

When creating a BCS instance, the creator needs to provide an existingOPC user/password, and this user will be automatically granted with BCSconsole admin and Fabric admin roles so that this user becomes BCSadministrator.

Authentication: for BCS console/CA/REST-proxy, the authentication isdone at Cloud Gate. For peer/orderer, the authentication is signaturebased. For BCS console, after authentication, the console gets theappRoles of the current user (by calling IDCS). If the user is notgranted with console admin or console user role, the connection isrejected. Otherwise, the console does the access control based on thepre-defined rules, e.g. normal user generally can only read info whileadmin can do anything.

In accordance with an embodiment, for CA, after authentication, the CAgets the appRoles of the current user. If the user is not granted withany Fabric role, the enroll request is rejected.

In accordance with an embodiment, for REST-proxy, after authentication,the REST-proxy gets the appRoles of the current user. If the user is notgranted with gateway admin or gateway user role, the request isrejected. Otherwise the REST-proxy does the access control based onpre-defined rules, e.g. normal user can invoke/query, admin can changeconfiguration, get metrics.

In accordance with an embodiment, Fabric-CA server provides themembership service for Fabric. It includes three parts: authenticationfor user, authorization for accessing a Block chain (a group of peersand orders) and CA server which could deliver certificate to applicationclient, peer and order.

In accordance with an embodiment, Fabric-CA use certificate to implementauthentication and authorization. The certificate include two types:enroll cert for authentication and transaction cert for authorization.

In accordance with an embodiment, IDCS also provide authentication andauthorization. But its authorization is implemented by OAuth. That meansif the peer wants to access the order, the peer should get the accesstoken of user from IDCS and use this token to access order.

FIG. 9A shows a typical IDCS use case for a single sign-on, inaccordance with an embodiment.

In accordance with an embodiment, a web application 901 can be added toIDCS 902 at an initial step. Then, a client, such as a web browser 900,can request authentication (e.g., username and password) from the webapplication. Because the web application has been added to the IDCS, theweb application can direct the web browser to make the authenticationrequest to IDCS. After receiving the response from the web application,the web browser can then request authentication (e.g., username andpassword) from IDCS.

IDCS can then authenticate the request and, upon successfulauthentication, send a token back to the web browser. The web browser,having been authenticated and received its token, can then make arequest from the web application. The web application can verify thetoken, and signal the web browser that authentication was successful.

In the case depicted in FIG. 9A, IDCS acts as the Identity Provider(IdP) to provide identity service for applications. All thecommunications among all parties are HTTP based. This use case isconfiguration driven, but only applies to HTTP based application.

FIG. 9B shows an IDCS use case for Fabric Client Authentication, inaccordance with an embodiment.

In accordance with an embodiment, a fabric client 904 that is associatedwith a fabric user that is already registered and enrolled (private keyand certificates of this use are already stored in state store at clientside) can request a new client( ), as well as getting the user contextof the client (username). The fabric SDK 905 can load a user from thestate store, and return a user object to the fabric client. The client,upon receiving the user object, can send a transaction proposal to thefabric SDK, which can sign the proposal using the same private key. Thesigned proposal can then go to the peer (or peers) 906, which willverify the signature at the membership service 907. The membershipservice can get the certificate for the user from the IDCS 902, and canverify the signature of the user using the certificate from the IDCS.The membership service can then return, to the peers, a verificationthat the signature is verified.

DAG Based Transaction Processing in a Distributed Ledger

In accordance with an embodiment, a DAG based transaction processingsystem and method in a distributed ledger can be introduced. The modelcan help achieve improved throughput performance. With additional weightmechanism, the final performance can be adjusted based on variousbusiness requirements. This is different from existing work that useslinear structure, and can achieve better performance.

Traditionally, Blockchain helps bring potential solutions to thedistributed ledger problem, with a linear record structure to recordtransaction history. However, due to the fundamental properties ofdistributed system, transaction conflicts often happens when multipleparties send numbers of transactions to the same shared ledger. Thereare several ways to alleviate the conflicts, however, none of thecurrent methods provides adequate performance.

Typical public Blockchains, such as those that are related tocryptocurrencies, throw the questions to miners, to let them decidewhich transactions to keep, and which to reject. An incentive model isactually chosen here as those miners (e.g., some Blockchains allowpayment to miners to prioritize certain transactions over others). Insuch situations, miners and other members of the blockchain consensusalmost always prefer those transactions with more fees. This can lead toslow performance of the Blockchains.

Other enterprise blockchain fabric utilize a timing model where eachpeer just submits the transactions based on the timing order in thebatch from ordering service. In this case, there will be case that manyof transactions be rejected due to the timing order and conflictsbetween transactions.

In accordance with an embodiment, the present systems and methodsprovide a new transaction processing model by introducing the DAGstructure. The model helps achieve an enhanced and improved throughputperformance. With weight mechanisms, the final performance can beadjusted based on various business requirements. This is quite differentfrom existing work that use linear structure and can achieve betterperformance.

FIG. 10 shows a system for supporting for providing a DAG basedtransaction processing system and method in a distributed ledger, inaccordance with an embodiment.

In accordance with an embodiment, a design for a DAG based transactionprocessing system and method in a distributed ledger can comprise acollision detector 1005, a ranking generator 1010, and a transactionpicker 1015.

In accordance with an embodiment, a collision detector can detect thecollision relationship among a number of transactions. For example, anumber of transactions from a transaction list 1001.

In accordance with an embodiment, generally, if transaction #1 dependson some key that will also be changed in transaction #2, then #1 and #2will be considered as conflicted. An edge can be drawn betweentransactions #1 and #2. There can be several DAGs for a batch oftransactions.

In accordance with an embodiment, each transaction can be marked with 1edge as the bottom layer in a graph, and it has an output vertex in theDAG.

In accordance with an embodiment, the collision condition can beexpanded, like two transactions change the same tables, or their creatorbelongs to same department.

In accordance with an embodiment, after collision detection, therelationship will be illustrated as several DAGs. Each transaction is avertex in a collision graph 1002.

In accordance with an embodiment, with the generated graphs 1002, theranking generator of the system and methods can add weight to eachvertex. If all transactions are considered as the same weight, then eachvertex's original rank can be set to a same value, such as 1.

In accordance with an embodiment, the weights associated with aplurality of transactions can be set, either automatically by thesystems and methods, or via a user/administrator input, or thetransactions themselves can carry an indication of their weights.

In accordance with an embodiment, the after setting the originalrank/weight 1003 for each transaction, the systems and methods cancalculate the rank by the vertex.

In accordance with an embodiment, if a transaction #1 has an originalvalue of x, and it points to another transaction #2 with a vertex, thentransaction #1 will contribute rank −x to transaction #2'sranking/weight.

In accordance with an embodiment, along with this process, each vertexin the DAGs will have a rank number, which is calculated with theoriginal rank and the contributed ranks by its neighbors.

In accordance with an embodiment, with the ranked DAGs, the systems andmethods, via the transaction picker, can pick the transactions based onthe ranking.

In accordance with an embodiment, a process can be followed, first,leave those bottom layer vertexes, and pick up those with highestranking following the principle that: if transaction # x is picked up,then all its neighbors will be unselected (i.e., those transactions that# x is in conflict with).

In accordance with an embodiment, finally, a subset of the transactionscan be selected, which are safe to be committed and it can be provedthat this way achieves the highest sum weight for that batch. Theselected transactions can be output as results 1004.

FIG. 11 shows an example relationship graph which can be used inembodiments of the present disclosure, in accordance with an embodiment.

In accordance with an embodiment, for example, suppose a ledger systemreceives a batch including 8 ordered transactions, named transactions #1to #8, 1101-1108. In this embodiment, each transactions' collisionrelationship, as determined by the collision detector, can be summarizedin one graph.

After collision detection, the collision relationship is determined tobe:

-   -   C(#1, #2, #3)=#6    -   C(#4, #5)=#7    -   C(#6, #7)=#8

In accordance with an embodiment, the collision relationship above canbe read as transaction #6 is in collision with transactions #1, #2, and#3. As well, transaction #7 is in collision with transactions #4 and #5,and transaction #8 is in collision with transactions #6 and #7.

In accordance with an embodiment, and continuing with this example, eachtransaction's weight is equal, i.e., 1. Based on the relationship, therelationship graph shown in FIG. 11 can be generated by the rankinggenerator, which can then be provided to the transaction picker, wherethe transactions to be committed can be selected.

As shown in FIG. 11, transactions #1, #2, #3, #4, and #5 all have aweight and a transactional ranking of 1. Using the above describedmethod, then, these weights are subtracted from the weight of acolliding transaction in order to determine a transactional rank foreach transaction. Thus, transaction #6 has a transactional rank ofnegative 2 as the transactional rank of transaction #6 is calculated bysubtracting the weights of transactions #1, #2, and #3 from its ownweight (i.e., 1−3=−2). A similar procedure is performed to determine thetotal transactional weight of transaction #7. There, the transactionalweights of transactions #4 and #5 are subtracted from the transactionalweight of transaction #7 to obtain a transaction ranking of negative 1(i.e., 1−2=−1). This procedure is then repeated for transaction #8, withthe negative weights of transactions #6 and #7 being subtracted from thetransactional weight of transaction #8 to receive an overalltransactional ranking of 4.

In accordance with an embodiment, after the collision graph iscalculated and the rank generator ranks each transaction according toits weighted transactional collision, the transaction picker candetermine which transactions will be committed. Here, transactions #8(with the highest rank) and #1-#5 will be committed as these values arepositive and as the transactions do not conflict with each other.Transactions #6 and #7 will are not selected to be committed as theirtransactional rank is lower and both transactions are in conflict withtransaction #8. Such selection is shown in the figure, with thetransactions picked to be committed having a bolded outline, while thosenot selected to be committed are shown as dashed lines.

FIG. 12 shows an example relationship graph which can be used inembodiments of the present disclosure, in accordance with an embodiment.

In accordance with an embodiment, FIG. 12 shows a second situation thatis more complex than that shown in FIG. 11.

In accordance with an embodiment, for example, suppose a blockchainsystem receives a batch including 8 ordered transactions, namedtransactions #1 to #8, 1201-1208. In the embodiment, the transactions'collision relationship, as determined by the collision detector, can besummarized in one graph.

After collision detection, the collision relationship is determined tobe:

-   -   C(#1, #2, #3)=#6    -   C(#4, #5)=#7    -   C(#3, #6, #7)=#8

In accordance with an embodiment, the collision relationship above canbe read as transaction #6 is in collision with transactions #1, #2, and#3. As well, transaction #7 is in collision with transactions #4 and #5,and transaction #8 is in collision with transactions #3, #6, and #7.

In accordance with an embodiment, and continuing with this example, eachtransaction's weight is equal, i.e., 1. Based on the relationship theranking generator can generate the relationship graph shown in FIG. 12.This graph can then be provided to the transaction picker, where thetransactions to be committed can be selected

As shown in FIG. 12, transactions #1, #2, #3, #4, and #5 all have aweight and transactional ranking of 1. Using the above described method,then, these weights are subtracted from the weight of a collidingtransaction in order to determine a transactional rank for eachtransaction. Thus, transaction #6 has a transactional rank of negative 2as the transactional rank of transaction #6 is calculated by subtractingthe weights of transactions #1, #2, and #3 from its own weight (i.e.,1−3=−2). A similar procedure is performed to determine the totaltransactional weight of transaction #7. There, the transactional weightsof transactions #4 and #5 are subtracted from the transactional weightof transaction #7 to obtain a transaction ranking of negative 1 (i.e.,1−2=−1). This procedure is then repeated for transaction #8, with theweights of transactions #3, #6, and #7 being subtracted from thetransactional weight of transaction #8 to receive an overalltransactional ranking of 3.

In the relationship graph of FIG. 12, the systems and methods canprovide for multiple collisions for transactions. For example, in FIG.12, transaction #3 has two collisions (with #6 and #8).

In accordance with an embodiment, after the collision graph iscalculated and the rank generator ranks each transaction according toits weighted transactional collision, the transaction picker candetermine which transactions will be committed. Here, transactions #8(with the highest rank) and #1, #2, #4, and #5 will be committed asthese values are positive and as the transactions do not conflict witheach other. Transaction #3 is not committed despite having atransactional rank equal to that of transactions #1, #2, #4, and #5because it is in conflict with transaction #8, which has a higherranking that #3. Transactions #6 and #7 are not selected to be committedas their transactional rank is lower and both transactions are inconflict with transaction #8. Such selection is shown in the figure,with the transactions picked to be committed having a bolded outline,while those not selected to be committed are shown as dashed lines.

FIG. 13 shows an example relationship graph which can be used inembodiments of the present disclosure, in accordance with an embodiment.

In accordance with an embodiment, FIG. 13 shows a second situation thatis more complex than that shown in FIG. 12. In the relationship map ofFIG. 13, there are 14 transactions that are grouped into two collisionclusters, where transaction #1 through #8, 1301-1308, are of cluster A,while transaction #9-#14, 1309-1314, are of cluster B.

In accordance with an embodiment, for example, suppose a blockchainsystem receives a batch including 14 ordered transactions, namedtransactions #1 to #4. And suppose all transactions' collisionrelationship, as determined by the collision detector, can be summarizedin one graph.

After collision detection, the collision relationship is determined tobe:

-   -   C(#1, #2, #3)=#6    -   C(#4, #5)=#7    -   C(#3, #6, #7)=#8    -   C(#9, #10, #11, #13)=#14    -   C(#11, #12)=#13

In accordance with an embodiment, and continuing with this example,suppose each transaction's weight is equal, i.e., 1, exceptingtransaction #10 which has an original weight of 2, and transaction #13,which has an original weight of 5, as set automatically or via anadministrator.

As shown in FIG. 13, transactions #1-#8 are contained in cluster A.Transactions #1, #2, #3, #4, and #5 all have a weight and transactionalranking of 1. Using the above described method, then, these weights aresubtracted from the weight of a colliding transaction in order todetermine a transactional rank for each transaction. Thus, transaction#6 has a transactional rank of negative 2 as the transactional rank oftransaction #6 is calculated by subtracting the weights of transactions#1, #2, and #3 from its own weight (i.e., 1−3=−2). A similar procedureis performed to determine the total transactional weight of transaction#7. There, the transactional weights of transactions #4 and #5 aresubtracted from the transactional weight of transaction #7 to obtain atransaction ranking of negative 1 (i.e., 1−2=−1). This procedure is thenrepeated for transaction #8, with the weights of transactions #3, #6,and #7 being subtracted from the transactional weight of transaction #8to receive an overall transactional ranking of 3.

As shown in FIG. 13, transactions #9-#14 are contained in cluster B.Transactions #9, $#11, #12, and #14 all have a weight and transactionalranking of 1. Transaction #10 has an original weight of 2, andtransaction #13 has an original weight of 5, from which 2 is subtracted(from transactions #11 and #12), to obtain a transactional ranking of 3.Transaction #14 has an original weight of 1, from which is subtracted 7(the original and modified weights of transactions #9, #10, #11, and#13), to generate a transactional ranking of negative 6.

In accordance with an embodiment, after the collision graph iscalculated and the rank generator ranks each transaction according toits weighted transactional ranking, the transaction picker can determinewhich transactions will be committed. Here, transactions #8 and #13(with the highest rank) and #1, #2, #4, #5, #9, and #10 will becommitted as these values are positive and as the transactions do notconflict with each other. Transaction #3 is not committed despite havinga transactional rank equal to that of transactions #1, #2, #4, and #5because it is in conflict with transaction #8, which has a higherranking that #3. Transactions #6 and #7 will are not selected to becommitted as their transactional rank is lower and both transactions arein conflict with transaction #8. Transactions #11 and #12 are notcommitted as they conflict with transaction #13, and transaction #14will not be committed due to its low transactional ranking as comparedto those transactions with which it shares an edge with.

FIG. 14 is a flowchart of an example method for directed acyclic graph(DAG) based transaction processing in a distributed ledger, inaccordance with an embodiment.

At step 1401, the method can provide, at an enterprise-grade,distributed ledger framework, a distributed ledger fabric, thedistributed ledger fabric handling a plurality of transactions.

At step 1402, the method can detect, by a collision detector, aplurality of collisions between the plurality of transactions.

At step 1403, the method can add, by a ranking generator, an initialweight parameter of a plurality of initial weight parameters to each ofthe plurality of transactions, and wherein the ranking generatorgenerates a DAG, wherein at least one vertex of the DAG comprises aranking number.

At step 1404, the method can select, by a transaction picker, a set ofthe plurality of transactions to commit, the set being determined basedupon the generated DAG.

While various embodiments of the present disclosure have been describedabove, it should be understood that they have been presented by way ofexample, and not limitation. The embodiments were chosen and describedin order to explain the features and principles of the disclosure andits practical application. The embodiments illustrate systems andmethods in which the various features of the present disclosure areutilized to improve the performance of the systems and methods byproviding new and/or improved functions, and/or providing performanceadvantages including, but not limited to, reduced resource utilization,increased capacity, increased throughput, improved efficiency, reducedlatency, enhanced security, and/or improved ease of use.

Some embodiments of the present disclosure are described herein withreference to flowcharts and/or block diagrams of methods, apparatus(systems), and computer program products which illustrate thearchitecture, functionality, process, and/or operation. Each block inthe flowchart or block diagram represents an element, function, process,module, segment, or portion of instructions, which comprises one or moreexecutable instructions for implementing the specified function. In somealternative embodiments, the functions noted in a block diagram orflowchart, occur out of the order noted in the figures. For example, twoblocks shown in succession may be executed substantially concurrently,or in the reverse order, depending upon the functionality involved. Eachblock of the flowcharts and/or block diagrams, and combinations ofblocks in the flowcharts and/or block diagrams, can be implemented bycomputer program instructions, and/or by special purpose hardware,and/or combinations of hardware and computer program instructions, whichperform the specified functions.

In some embodiments, features of the present disclosure are implementedin a computer including a processor, a computer-readable storage medium,and a network card/interface for communicating with other computers. Insome embodiments, features of the present disclosure are implemented ina network computing environment comprising a computing system includingvarious types of computer configurations, including personal computers,hand-held devices, multi-processor systems, microprocessor-based orprogrammable consumer electronics, network PCs, minicomputers, mainframecomputers, and the like interconnected by a network. The network can bea Local Area Network (LAN), switch fabric network (e.g. InfiniBand),Wide Area Network (WAN), and/or the Internet. The network can includecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers.

In some embodiments, features of the present disclosure are implementedin a computing system that includes a back-end component (e.g., as adata server), or that includes a middleware component (e.g., anapplication server), or that includes a front-end component (e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described herein), or any combination of such back-end,middleware, or front-end components interconnected by a network. Thecomputing system can include clients and servers having a client-serverrelationship to each other. In some embodiments, features of thedisclosure are implemented in a computing system comprising adistributed computing environment in which one or more clusters ofcomputers are connected by a network. The distributed computingenvironment can have all computers at a single location or have clustersof computers at different remote geographic locations connected by anetwork.

In some embodiments, features of the present disclosure are implementedin the cloud as part of, or as a service of, a cloud computing systembased on shared, elastic resources delivered to users in a self-service,metered manner using Web technologies. Characteristics of the cloud mayinclude, for example: on-demand self-service; broad network access;resource pooling; rapid elasticity; and measured service. Clouddeployment models include: Public, Private, and Hybrid. Cloud servicemodels include Software as a Service (SaaS), Platform as a Service(PaaS), Database as a Service (DBaaS), and Infrastructure as a Service(IaaS). The cloud generally refers to the combination of hardware,software, network, and web technologies which delivers shared elasticresources to users. The cloud, as used herein, may include public cloud,private cloud, and/or hybrid cloud embodiments, and may include cloudSaaS, cloud DBaaS, cloud PaaS, and/or cloud IaaS deployment models.

In some embodiments, features of the present disclosure are implementedusing, or with the assistance of hardware, software, firmware, orcombinations thereof. In some embodiments, features of the presentdisclosure are implemented using a processor configured or programmed toexecute one or more functions of the present disclosure. The processoris in some embodiments a single or multi-chip processor, a digitalsignal processor (DSP), a system on a chip (SOC), an applicationspecific integrated circuit (ASIC), a field programmable gate array(FPGA) or other programmable logic device, state machine, discrete gateor transistor logic, discrete hardware components, or any combinationthereof designed to perform the functions described herein. In someimplementations, features of the present disclosure are implemented bycircuitry that is specific to a given function. In otherimplementations, features are implemented in a computer, computingsystem, processor, and/or network, configured to perform particularfunctions using instructions stored e.g. on a computer-readable storagemedia.

In some embodiments, features of the present disclosure are incorporatedin software and/or firmware for controlling the hardware of a processingand/or networking system, and for enabling a processor and/or network tointeract with other systems utilizing the features of the presentdisclosure. Such software or firmware may include, but is not limitedto, application code, device drivers, operating systems, virtualmachines, hypervisors, application programming interfaces, programminglanguages, and execution environments/containers. Appropriate softwarecoding can readily be prepared by skilled programmers based on theteachings of the present disclosure.

In some embodiments, the present disclosure includes a computer programproduct which is a machine-readable or computer-readable storage medium(media) having instructions comprising software and/or firmware storedthereon/in, which instructions can be used to program or otherwiseconfigure a system such as a computer to perform any of the processes orfunctions of the present disclosure. The storage medium or computerreadable medium can include any type of media or device suitable forstoring instructions and/or data including, but not limited to, floppydisks, hard drives, solid state drives, optical discs, DVD, CD-ROMs,microdrives, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs,DRAMs, VRAMs, flash memory devices, magnetic or optical cards, molecularmemories, nanosystems, or variations and combinations thereof. Inparticular embodiments, the storage medium or computer readable mediumis a non-transitory machine-readable storage medium or non-transitorycomputer-readable storage medium.

The foregoing description is not intended to be exhaustive or to limitthe disclosure to the precise forms disclosed. Additionally, whereembodiments of the present disclosure have been described using aparticular series of transactions and steps, it should be apparent tothose skilled in the art that, unless stated, the embodiment does notexclude performance of additional transactions and steps. Further, whilethe various embodiments describe particular combinations of features ofthe disclosure it should be understood that different combinations ofthe features will be apparent to persons skilled in the relevant art aswithin the scope of the disclosure. In particular, a feature(device-like or method-like) recited in a given embodiment, variant, orshown in a drawing may be combined with or replace another feature inanother embodiment, variant or drawing, without departing from the scopeof the present disclosure. Moreover, it will be apparent to personsskilled in the relevant art that various additions, subtractions,deletions, variations, substitutions of elements with equivalents, andother modifications and changes in form, detail, implementation andapplication can be made therein without departing from the spirit andscope of the disclosure. It is intended that the broader spirit andscope of the disclosure be defined by the following claims and theirequivalents.

What is claimed is:
 1. A system for directed acyclic graph (DAG) basedtransaction processing in a distributed ledger comprising: anenterprise-grade, distributed ledger framework; and a distributed ledgerfabric, the distributed ledger fabric handling a plurality oftransactions, a collision detector, wherein the collision detectordetects a plurality of collisions between the plurality of transactions;a ranking generator, wherein the ranking generator adds an initialweight parameter of a plurality of initial weight parameters to each ofthe plurality of transactions, and wherein the ranking generatorgenerates a DAG, wherein at least one vertex of the DAG comprises aranking number; and a transaction picker, wherein transaction pickerselects a set of the plurality of transactions to commit, the set beingdetermined based upon the generated DAG.
 2. The system of claim 1,wherein the plurality of initial weight parameters are provided via aninput.
 3. The system of claim 1, wherein the plurality of initial weightparameters are automatically derived.
 4. The system of claim 3, whereinthe derivation of the plurality of initial weight parameters is basedupon at least a relative importance of each of the plurality oftransactions.
 5. The system of claim 1, wherein the generated DAGcalculates a ranking for each of the plurality of transactions, whereinthe calculated ranking for each of the plurality of transactions is oneof an original weight parameter assigned to a transaction or a modifiedweight parameter.
 6. The system of claim 5, wherein each modified weightparameter is calculated based upon an initial weight parameter of asubject transaction and at least one ranking for a transaction inconflict with the subject transaction.
 7. The system of claim 1, whereineach transaction of the set of plurality of transactions to commit donot conflict.
 8. A method for directed acyclic graph (DAG) basedtransaction processing in a distributed ledger, the method comprising:providing, at an enterprise-grade, distributed ledger framework, adistributed ledger fabric, the distributed ledger fabric handling aplurality of transactions; detecting, by a collision detector, aplurality of collisions between the plurality of transactions; adding,by a ranking generator, an initial weight parameter of a plurality ofinitial weight parameters to each of the plurality of transactions, andwherein the ranking generator generates a DAG, wherein at least onevertex of the DAG comprises a ranking number; and selecting, by atransaction picker, a set of the plurality of transactions to commit,the set being determined based upon the generated DAG.
 9. The method ofclaim 8, wherein the plurality of initial weight parameters are providedvia an input.
 10. The method of claim 8, wherein the plurality ofinitial weight parameters are automatically derived.
 11. The method ofclaim 10, wherein the derivation of the plurality of initial weightparameters is based upon at least a relative importance of each of theplurality of transactions.
 12. The method of claim 8, wherein thegenerated DAG calculates a ranking for each of the plurality oftransactions, wherein the calculated ranking for each of the pluralityof transactions is one of an original weight parameter assigned to atransaction or a modified weight parameter.
 13. The method of claim 12,wherein each modified weight parameter is calculated based upon aninitial weight parameter of a subject transaction and at least oneranking for a transaction in conflict with the subject transaction. 14.The method of claim 8, wherein each transaction of the set of pluralityof transactions to commit do not conflict.
 15. A non-transitory computerreadable storage medium having instructions thereon for a directedacyclic graph (DAG) based transaction processing in a distributedledger, which when read and executed cause one or more computers toperform steps comprising: providing, at an enterprise-grade, distributedledger framework, a distributed ledger fabric, the distributed ledgerfabric handling a plurality of transactions; detecting, by a collisiondetector, a plurality of collisions between the plurality oftransactions; adding, by a ranking generator, an initial weightparameter of a plurality of initial weight parameters to each of theplurality of transactions, and wherein the ranking generator generates aDAG, wherein at least one vertex of the DAG comprises a ranking number;and selecting, by a transaction picker, a set of the plurality oftransactions to commit, the set being determined based upon thegenerated DAG.
 16. The non-transitory computer readable storage of claim15, wherein the plurality of initial weight parameters are provided viaan input.
 17. The non-transitory computer readable storage of claim 15,wherein the plurality of initial weight parameters are automaticallyderived.
 17. The non-transitory computer readable storage of claim 17,wherein the derivation of the plurality of initial weight parameters isbased upon at least a relative importance of each of the plurality oftransactions.
 19. The non-transitory computer readable storage of claim15, wherein the generated DAG calculates a ranking for each of theplurality of transactions, wherein the calculated ranking for each ofthe plurality of transactions is one of an original weight parameterassigned to a transaction or a modified weight parameter.
 20. Thenon-transitory computer readable storage of claim 19, wherein eachmodified weight parameter is calculated based upon an initial weightparameter of a subject transaction and at least one ranking for atransaction in conflict with the subject transaction.